This question already has answers here:
How do I get the SQLSRV extension to work with PHP, since MSSQL is deprecated?
(3 answers)
Closed 3 years ago.
I'm trying to run mssql driver for PHP, but something goes wrong.
I managed to get the right drivers for mssql, then added the extensions in php.ini, but PHP is still running "--without-mssql" "--without-pdo-mssql".
I'm running PHP 5.4 under Apache 2.2 on Windows XP SP3.
How to start the mssql drivers?
I've just had the same problem, for me I needed to use a different version of the driver.
I was using:
extension=php_sqlsrv_53_ts.dll
Which gave me the following error in PHP:
[28-Nov-2013 10:58:47 UTC] PHP Warning: PHP Startup: sqlsrv: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API
The solution:
extension=php_sqlsrv_54_ts.dll
Download from: http://www.microsoft.com/en-us/download/details.aspx?id=20098
See this answer: https://stackoverflow.com/a/25199324/1847383. If you use PHP as an Apache module, use the thread safe version.
I have found a great tutorial and explanation on this website:
http://bendustries.co/wp/setting-up-xampp-to-work-with-mssql/
All you need to do is download from here :
https://www.microsoft.com/en-us/download/details.aspx?id=20098
two files called:
php_pdo_sqlsrv.dll
php_pdo_sqlsrv.dll
And place then inside the php\ext folder.
Then you need to add those two lines under "Dynamic Extensions"
extension=php_sqlsrv.dll
extension=php_pdo_sqlsrv.dll
Save your php.ini file and restart apache, This process worked for me on win7 after I tried several other methods !
Related
This question already has answers here:
PHP Startup Unable to load dynamic library php_mongo.dll
(7 answers)
Closed 4 years ago.
I'm trying to install the mongodb extension in PHP 7.1.0 but basically the extension is not loaded by PHP (not displayed using php_info() and not throws any error, just not load), i have follow and searched too many tutorials and nothing has worked.
MongoDB 4.0.2 is installed and working as expected. PHP 7.1 is working as expected.
Steps made:
1) Download PECL compatible (PHP version and thread safety/no thread safety) mongodb driver.
2) Open /ext directory in PHP installation and put the .dll extension downloaded on it.
3) Edit php.ini file and enable the mongodb extension appending the code using (extension=php_mongodb.dll).
4) Restart Apache service.
The corresponding php.ini file is loading correclty (see print below)
I tryed use another old versions of the extension and not worked.
I have many PHP versions installed, i tryed in 5.6 too, and not worked as well.
I have tryed in other machine using PHP 7.2 and not worked, i searched too many and not found a solution, i hope some person can help! Thanks.
References:
Windows 8.1
http://php.net/manual/en/mongodb.installation.windows.php
https://pecl.php.net/package/mongodb
All marked as blue i have tried to install, and all downloads are made Thread Safety x64 (correspondent architecture).
To solve this, need to copy some .dll files from PHP install to Apache install, hope to help someone! Reference
I have a problem. I am trying to query the db2 database with php 7 on Windows. So I have read a lot about connecting to db2 etc, and I have tried a lot of things and still I have the problem.
This is php.ini file:
extension=php_ibm_db2.dll
And this is an error I get every time:
[05-Oct-2017 13:44:55 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_ibm_db2.dll' - The specified module could not be found. in Unknown on line 0
I have tried both versions thread safe and non thread safe, but I can't get it to work.
I have done it with the php version 5.5.38 but I would like to use the latest one.
Additional information:
I am running the windows 10 64bit.
I have downloaded 1.9.9 dll from the pecl library.
I have put it in the php.ini where all the other extensions are and in the following folder described down:
Of course there is the file in the php\ext\php_ibm_db2.dll
I am the administrator, so permissions are full.
Please if you have some solutions tell me.
Thanks in advance.
I have error on my codeigniter application on upgrading from PHP 5.6 to PHP 7.0 .
My codeigniter is using MYSQL database and IIS web server.
I noted that php_pdo_oci.dll extension has deprecated on PHP 7.0 .
I learn that this extension is for Oracle.
Since the app does not even use Oracle , why is this extension library required to be loaded? Has Anyone ever experienced this? How do we turn off the file load, php_pdo_oci.dll ?
Thanks.
A PHP Error was encountered
Severity: Core Warning
Message: PHP Startup: Unable to load dynamic library 'C:\Program Files
\php70\ext\php_pdo_oci.dll' - The specified module could not be
found.
Filename: Unknown
Line Number: 0
It is a part of Oracle C Interface you can disable the extension in your php.ini by commenting that line will do the trick or if you want to install that extension try this
refer : PHP unable to load dynamic library "php_pdo_oci.dll"
I had the same problem first go to you php.ini and comment out the pdo_oci
and after that open xampp and you will find 4 options in the xampp horizontal to apache start/stop admin config go to config and php.ini and comment the php_pdo_oci there also and you are done
I am trying to connect MSSQL to PHP. i am following this tutorial. Anyway after i added the dll files as described in that tutorial, i get the following warning. How can i solve this ?
php starup sqlsrv unable to initialize module module compiled with module api=20090626 php compiled with module api=20020520 these options need to match
note:i have gone through this post but none helped.
Looks like you've tried to install the sqlsrv extension for php 5.3 on a php 5.2 system.
Either run <?php phpinfo(); ?> and look for the php version and look for the following entries:
PHP Version
Thread Safety
pick the appropriate .dll from the sqlsrv driver: the version number must match and if thread safety is enabled pick the ts version, if not pick the nts version.
For anyone trying to get it to work with PHP 5.5 (PHP compiled with module API=20121212) then you can replace the dlls in the ext folder with new updated binaries >here<
Don't forget to enable the new dlls in the php configuration.
In my case the issue was with multiple php version under an Apache. The php cli loaded another php version's php.ini. The takeaway is: always check the configuration before you dig deeper into the problem.
I'm trying to get a PHP site working in IIS on Windows Server with MySQL.
I'm getting this error…
Fatal error: Call to undefined function mysql_connect() in C:\inetpub...\adodb\drivers\adodb-mysql.inc.php on line 363
Update…
This link outlines the steps I followed to install PHP on my server:
How do I get PHP and MySQL working on IIS 7.0 ?
(note especially steps 6 and 8 regarting php.ini and php_mysql.dll).
Only two lines in the phpinfo report reference SQL:
<?php
phpinfo();
?>
Configure Command:
cscript /nologo configure.js "--enable-snapshot-build" "--enable-mysqlnd"
sql.safe_mode:
Local Value Off, Master Value Off
PHP Configure Command http://img79.imageshack.us/img79/2373/configurecommandmw8.gif
PHP sql.safe_mode http://img49.imageshack.us/img49/3066/sqlsafemoderu6.gif
Update…
I found the solution: How do I install MySQL modules within PHP?
Check out phpinfo to see if the mysql functions are compiled with your PHP
<?php
phpinfo();
?>
Since in some versions of php, its not default with the install.
Edit for the Update:
You should have a full MySQL category in your phpinfo();
See this for example: https://secure18.easycgi.com/phpinfo.php (googled example)
It sounds like the version of PHP you are using has not been compiled with MySQL support, or has not been enabled in the php.ini.
Looks like you haven't got the MySQL PHP extensions installed! You shouldn't have to do any configuration other than installing the correct modules (and shouldn't be doing anything with ADODB).
PHP comes in 2 versions as well - a CGI version and an ISAPI module. You're best using the ISAPI version with ISS and adding all the trimmings...
I found the solution: How do I install MySQL modules within PHP?