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.
Related
I have updated four files names given below in php/ext folder of xampp
I also updated these updated lines in php.ini
extension=php_pdo_sqlsrv_7_nts_x64.dll
extension=php_pdo_sqlsrv_7_ts_x64.dll
extension=php_sqlsrv_7_nts_x64.dll
extension=php_sqlsrv_7_ts_x64.dll
but when I try to run php artisan migrate it gives me this error
PHP Warning: PHP Startup: Unable to load dynamic library 'D:\xampp\php\ext\php_pdo_sqlsrv_7_nts_x64.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
what could be the possible problem?
Am I doing something wrong
I downloaded files from https://www.microsoft.com/en-us/download/details.aspx?id=20098
Actually I came to knew that x64 or x86 is version of php which can be obtained from phpinfo(). so my php was x86 and I was using x64 files and also my php was thread enables so I did not need nts files
I installed the recent versions of xampp for windows and yaml on my PC with windows 8.1 64bit.
The versions were
xampp-win32-7.0.9-1-VC14-installer.exe
php_yaml-2.0.0rc8-7.0-ts-vc14-x86.zip
I put the line of extension=php_yaml.dll to the end of php.ini file.
I copied php_yaml.dll to C:/xampp/php/ext folder.
I copied yaml.dll to C:/xampp/apache/bin folder.
phpinfo(); command displayed that yaml was enabled.
But bad warning still appeared on command prompt when typing php command:
$ php
PHP Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The spec
ified module could not be found.
in Unknown on line 0
Warning: PHP Startup: Unable to load dynamic library 'C:\xampp\php\ext\php_yaml.dll' - The specified
module could not be found.
in Unknown on line 0
See it on screenshots:
How to fix it?
Add ;C:\xampp\apache\bin to PATH Windows environment variable.
I fixed mine by downloading the correct version of yaml. The yaml Version has to match the installed PHP version. Make sure that you match the thread-safe and non-thread-safe option with your PHP aswell.
How to check if your PHP is thread-safe
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.
I am trying to use Firebird 2.5.2.26539 with:
Windows 8
Apache 2.2.22
PHP 5.4.10
When i enable the extensions of firebird in php:
- extension=php_interbase.dll
- extension=php_pdo_firebird.dll
I get these errors:
[26-Dec-2012 12:08:11 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_interbase.dll' - Impossible to locate the specified module.
in Unknown on line 0
[26-Dec-2012 12:08:13 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_pdo_firebird.dll' - Impossible to locate the specified module.
in Unknown on line 0
if i make PHP -a in command line, the error message is different: cannot find fbclient.dll.
I have the flamerobin running and it opens the database. So i copy the fbclient.dll to the PHP root path.
Then the errors change to:
[26-Dec-2012 11:55:46 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_interbase.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
[26-Dec-2012 11:55:46 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Program Files (x86)\PHP\ext\php_pdo_firebird.dll' - %1 is not a valid Win32 application.
in Unknown on line 0
Can anyone help me on this one? I suspect that this version of Firebird still does not have the correct extensions made for the PHP.
Thank you.
I am repeating the comment (which some might miss) by Nenhum Pois é above, because it is the real solution to the problem:
The problem was the fbclient.dll from the FB 64 bits installation. I just got the fbclient.dll from 32bits, copy it into the PHP root and it solved the problem
Cli and Apache PHP run with two different configuration files. That will explain the lacking error message in CLI mode. The likelihood is the extensions for this application where not stored in the PHP extension folder. I'm not versed with the configurations under windows so you may need to google for the Windows PHP extension directory and ensure your extension file is there.
Judging by your error the path is "C:\Program files(x86)\PHP\ext\
Please ensure your extension files are there before attempting to load them.
If you run on Windows check if your extension is compiled with the same Visual Studio compiler version as your PHP interpreter.
From PHP download page https://windows.php.net/download
PHP 7.3 = VC15
PHP 7.1 = VC14
PHP 5.6 = VC11
Whereas the MongoDB extension for examples is compiled with VC11, see https://pecl.php.net/package/mongo/1.6.16/windows and check the DLL list filename for -vc11-