Using IIS 10 in Windows 10 and trying to install PHP 5.5.6
I'm getting the following error when doing php -v:
PHP Startup: Unable to load dynamic library ext/php_oci8_11g.dll - The specified module could not be found.
The file exist in C:\php\ext\php_oci8_11g.dll and the extensions variable is defined in php.ini as extension_dir = "ext".
I've installed ODBC driver and Oracle Instant client Version 11.2.0.4.0
When doing phpinfo() I only get in the PDO table PDO drivers: mysql instead of the expected PDO drivers: mysql, oci. And of course, I lack from a table PDO_OCI.
Needless to say my php.ini has extension=php_pdo_oci.dll and extension=php_oci8_11g.dll enabled .
I also tried restarting ISS with issreset and even restarting the computer.
Additionally, I also get this other error:
PHP Startup: Unable to load dynamic library ext\php_pdo_oci.dll - The specified module could not be found.
The file is as well in the extensions folder.
What am I missing?
I was missing placing instantclient_11_2 within the php folde rin C:\php\instantclient_11_2 and adding the path to the PATH environment variable.
Related
I am trying to deploy OCI8 with PHP7 and Apache 2.4.
The database does not reside in my local pc. It is on a different server with Oracle 11g Enterprise version and 64bit architecture as well.
I am unable to load oci8 on my local PC with the following settings
extension=php_oci8_11g.dll
extension_dir = c:\php\ext
The path in system variables is properly updated with c:\php;
I have followed the instructions carefully https://www.oracle.com/technetwork/articles/dsl/technote-php-instant-084410.html
I am using all versions with 64bit as my PC is running 64bit:
mod_fcgid
instantclient
php7
apache 2.4
phpinfo() shows perfectly on my browser but it does not show a table for oci8. I then run the command php -m in cmd to double check the status, but I get the following popup:
The program cannot start because php7.dll is missing from your computer.
Try reinstalling the program to fix the problem.
And the cmd window shows the following error:
Warning: PHP Startup: Unable to load dynamic library 'php_oci8_11g'
(tried: C:\php\ext\php_oci8_11g (The specified module could not be
found.), C:\php\ext\php_php_oci8_11g.dll (The specified module could
not be found.)) in Unknown on line 0
What could be the problem?
I had it working with extension=oci8_12c instead. It turned out that even if the remote Oracle Database I am trying to connect with is of version 11g, the latest oci8 version supports 11g as well.
This worked: https://www.oracle.com/technetwork/articles/dsl/technote-php-instant-12c-2088811.html
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 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.
Is there a driver for MSSQL Server for PHP (64-bit)?
I have Apache 2.4 (64-bit) environment installed. Also PHP 5.5.12 (64-bit)
I have search for MSSQL Server driver "on the net" for php 64-bit but I found nothing. All I can find is a 32-bit. Also, all the articles that I found were old and nothing recent.
I tried to install the 32-bit driver but I get a warning when executing C:\php>php -m
This is the warning
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application. in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library 'ext\php_pdo_sqlsrv_54_ts.dll' - %1 is not a valid Win32 application. in Unknown on line 0
I downloaded the MSSQL Server Driver from Microsoft Drivers 3.0 for PHP for SQL Server
If there a MSSQL Server driver available for PHP 64-bit environment?
If not is there a workaround beside having to go back to 32-bit PHP environment?
I have run into this issue as well. What I have found is that you need to make sure that the extension=php_sqlsrv_54_ts.dll area of your php.ini file is only uncommented on the Apache location of php.ini.
For example:
if you have C:\Webserver\bin\apache\bin\php.ini, you probably have a C:\Webserver\bin\php\php.ini as well. Make sure your extension referrences are ONLY in the ...\apache\bin\php.ini.
It took me 3 hours to realize there were 2 different php.ini files and that the error was throwing because I had the extension initialized in the wrong php.ini file yet it was still looking there for some reason. I hope this helped.
Have you tried updating to php 7 ?
The x64 builds of PHP 5 for Windows are experimental, and do not provide 64-bit integer or large file support. Therefore I doubt MS will release a php5 version of the driver especially since the one for php 7 has been out for a few months now.
This MSSQL driver was release in July of 2016
Download the "SQLSRV40.EXE" from https://www.microsoft.com/en-us/download/details.aspx?id=20098
The executable is a self-extractor, unpack where you want.
You even get the PDO for the same price.
Here are the files in the package
PHP Drivers License Terms.rtf
php_pdo_sqlsrv_7_nts_x64.dll
php_pdo_sqlsrv_7_nts_x86.dll
php_pdo_sqlsrv_7_ts_x64.dll
php_pdo_sqlsrv_7_ts_x86.dll
php_sqlsrv_7_nts_x64.dll
php_sqlsrv_7_nts_x86.dll
php_sqlsrv_7_ts_x64.dll
php_sqlsrv_7_ts_x86.dll
release.txt
SQLSRV_Readme.htm
SQLSRV_ThirdPartyNotices.rtf
Tested with php 7.0, 7.1, 7.2
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.