I'm having some issues connecting to an LDAP server using PHP 5.6 on a RHL 7 environment. The application itself is running Codeigniter, and when I attempt an LDAP connection I get the error:
LDAP functionality not present. Either load the module ldap php module
or use a php with ldap support compiled in.
I've used yum to install PHP-ldap and openldap, as well as manually added the extension in the loaded PHP.ini file with.
extension=/usr/lib64/php/modules/ldap.so
However, I'm still getting the error, and phpinfo () is not showing ldap as a loaded module.
I've also checked my Apache error logs for anything useful in there. While I'm getting no errors when I attempt to reload the page, when I restart the server, I am getting an error:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib64/php/modules/ldap.so' - /usr/lib64/php/modules/ldap.so:
cannot open shared object file: No such file or directory in Unknown
on line 0
I have checked, and ldap.so does exist at that location.
I should also mention that PHP is installed at an abnormal location, it's at /opt/rh/rh-php56, not sure if that might be causing the issue.
UPDATE: -----------
I've copied and moved ldap.so to /opt/rh/rh-php56/root/usr/lib64/php/modules/ldap.so and removed the path in php.ini so that it now calls ldap like extension=ldap.so.
The warning has changed to
PHP Warning: PHP Startup: ldap: Unable to initialize module\nModule
compiled with module API=20100525\nPHP compiled with module
API=20131226\nThese options need to match\n in Unknown on line 0
Is there something I need to do to compile the ldap.so file?
The issue came down to installing the wrong version of LDAP for the version of PHP the server was running.
As I am running rh-php56-php, I also needed to install rh-php56-php-ldap, not the standard php-ldap package. Once the correct package was installed, the errors that I was encountering ceased.
Related
I am trying to use google cloud php sdk to fetch from google bigtable and found that it requires grpc to be enabled.
So i tried installing grpc on my xampp by downloading dll file from https://pecl.php.net/package/gRPC
I am running PHP version 5.6 on using xampp on my windows machine
I also updated my php.ini file by adding below
extension=php_grpc.dll
I restarted apache and printing phpinfo but i am not able to find grpc module loaded.
I also checked the list of extensions loaded by running php -m command and i get below error.
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_grpc.dll' - The specified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_grpc.dll' - The specified module could not be found.
in Unknown on line 0
Can anyone provide me a solution?
I was facing the same issue when installing the Google Ads PHP library on WAMP Server. I solved it downloading a different gRPC version
https://windows.php.net/downloads/pecl/releases/grpc/1.17.0/
Extacted the file and copied on the extensions directory of WAMP and on the php.ini just add the next line
extension=grpc
Restart apache and php. Hope it helps
There are many similar explanations about this topic, but none solved my problem. I have followed the installation guide of php Pthreads at: http://php.net/manual/en/pthreads.installation.php
After that extension was showing at wampserver settings window:
Howerver, it did not appear in loaded extensions in localhost. I have checked the logs and saw the error:
PHP Warning: PHP Startup: pthreads: Unable to initialize module
Module compiled with module API=20121212
PHP compiled with module API=20131226
These options need to match in Unknown on line 0
I have searched for the error. Some explanations said to download the correct version of "Pthreads". I have tried several versions and now I get another error:
PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp64/bin/php/php5.6.25/ext/php_pthreads.dll' - ��
������ �������� �����.
in Unknown on line 0
Both "php.ini" files in Apache folder and Php folder have the lines:
extension=php_pthreads.dll
extension_dir ="c:/wamp64/bin/php/php5.6.25/ext/"
Currently I get this error and extension is not loaded. What can be done here? Thank you
It looks to me like pthreads 3.0.6 is built only for PHP7.
As I see you are using PHP5.6.25 then the last version of pthreads that will work on that PHP is V2.0.9
Downloadable from here
I have manually installed Apache and PHP on my server and it has to connect to the sql server 2012 for DB. My configurations are as below:
Apache 2.4.23 VC11 x64 installed on E:\
PHP 7.0.12 VC14 x64 installed on e:\
I have installed the srv dlls from the microsoft website.( SQLSRV40.exe). Also I have installed the msodbcsql dll and the sql native client (both 64bit) , but while I run these two .exe it gets installed on to the default path which is c:\
I have enabled the php_errors and I could see that php is working fine with the phpinfo() but on the phpinfo() i dont see the sql.dll files being picked up. More over the php_error file throws the error:
"[01-Nov-2016 12:14:58 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0
[01-Nov-2016 12:14:59 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'E:/php/ext/php_sqlsrv_7_ts_x64.dll' - The specified module could not be found.
in Unknown on line 0"
Am not able to figure out what went wrong, Could some one help me out, please
You can simply move the .dll files from C:\ to E:\php\ext\ (copy & paste).
Alternatively you can alter the path in the php.ini file which should also be in E:\php.
It might be helpful if you search for all files containing the text php_sqlsrv_7_ts_x64 then you know where they are actually loaded.
I'm trying to get the PDO SQL driver to work with my Xampp and PHP 5.5 installation. I have followed the directions found below as Microsoft has yet to make a PHP 5.5 SQL driver:
As you can see by the images I have downloaded the file, placed it into my C:\xampp\php\ext folder and added it to php.ini and restarted apache.
But still when running phpinfo(); it shows it as not loaded. What did I do wrong?
EDIT:
Error log for PHP shows this:
[25-Sep-2014 14:22:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_sqlsrv_55_ts.dll' - The specified module could not be found.
in Unknown on line 0
[25-Sep-2014 14:22:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_pdo_sqlsrv_55_ts.dll' - The specified module could not be found.
in Unknown on line 0
It seems by using Dependency Walker (http://www.dependencywalker.com) I found out that the modules couldn't find php5ts.dll file, even though it was directory up.
So I edited the Windows 2008 R2 Environment Variables and added C:\xampp\php to the Path variable and it worked like a charm.
I used the instructions here on how to edit the variables in Windows:
http://thommck.wordpress.com/2010/12/06/how-to-add-a-path-to-the-system-variables-in-windows-2008-r2/
I'm trying to get PHP to load some extensions (sqlsrv driver for PHP PDO).
I'm using a wamp server, With PHP 5.4, Apache 2.4.4.
In my PHP.ini file, i've entered the following line:
extension_dir = C:\wamp\bin\php\php5.4.16\ext
...
extension=php_pdo_sqlsrv_54.nts.dll
However in the apache error log, whenever I restart the apache service, I get the error message:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_pdo_sqlsrv_54_nts.dll' - The specified module could not be found.\r\n in Unknown on line 0
Now, I know for a fact, this error is incorrect. If I copy the file location directly from the error log, (C:\wamp\bin\php\php5.4.16\ext\php_pdo_sqlsrv_54_nts.dll) and paste it into windows explorer, it finds the file fine.
I've added the ext directory to windows PATH environment variable, still no success.
Any ideas what to try next?
Thanks
Your problem is that you are trying to run a NTS 'Not Thread Safe' dll with a PHP that is 'Thread Safe', so initially try downloading the Thread Safe version of the sqlsrv DLL.
BIG NOTE and possibly your next problems solution:
As far as I know the sqlserver database interface dlls are only available as 32bit. So if you have installed the 64bit WAMPServer you will have to uninstall and install the 32bit WAMPServer.