PHP PDO sqlsrv Unable to load dynamic library - php

Hi I have wampserver 64 version 2.5, php version 5.5.12 and my operating system windows 10
I downloaded the sqlsrv drivers and I put it here in the directory
C:\wamp\bin\php\php5.5.12\ext
and I paste this in my php.ini,
extension=php_pdo_sqlsrv_55_ts.dll
extension=php_sqlsrv_55_ts.dll
the php.ini is located here C:\wamp\bin\php\php5.5.12
when I restart the services this is the error will pop up
I don't know how to fix this or is there something wrong that i miss ?
Thank you in advance.

As far as I am aware there is no 64bit PHP compatible SQL Server library. You will have to install WAMPServer 32bit. This is not a WAMPServer limitation, its just that Microsoft has not yet completed the 64 bit PHP extension.
Probably they were waiting for PHP7 which is the first truly 64bit version of PHP

Related

PHP_Mongo Driver for PHP 5.3.8 and WAMP 2.2

I am using WAMP server 2.2. and PHP 5.3.8. I need to connect to MongoDB
from PHP. Can anyone please tell me, which PHP_mongo db is suitable of the drivers available in the following link
https://s3.amazonaws.com/drivers.mongodb.org/php/index.html .
I believe WAMP is compiled using VC9, thread safe, 32bit.
The corresponding DLL file (inside one of the .zip archives) would be: php_mongo-1.4.5-5.3-vc9.dll

Configuration Issues with SQLSRV for PHP for MSSQL

I am installing a configuration with WampServer 2.4:
- Windows 7 64-bit sp1
- WampServer 2.4 64-bit
- PHP 5.4.3 64-bit (came with the WampServer)
- Apache 2.4.4
- Microsoft SQL Server 2012 Native Client 64-bit
- Microsoft SQLSRV 3.0 (php_sqlsrv_54_ts.dll, php_pdo_sqlsrv_54_ts.dll and they are put in c:/wamp/bin/php/php5.4.3/ext/
And I edited the C:\wamp\bin\apache\Apache2.4.4\bin\php.ini with the lines:
- extension_dir = "c:/wamp/bin/php/php5.4.3/ext/"
- extension=php_sqlsrv_54_ts.dll
- extension=php_pdo_sqlsrv_54_ts.dll
And I restarted all the services from Wamp.
But I still couldn't see the SQLSRV section from phpinfo -- and of course my connection test program failed.
What might have gone wrong?
Can anyone help?
Your issue is because you are using (or WAMP has given you) 64bit php, where as your sqlsrv driver is most likely 32bit.
Your solution is to switch to a 32bit version of php (The benefits of running in 64, are pretty much non existent anyway unless you need larger data types), or to recompile the sqlsrv driver in 64bit (Likely more trouble than it is worth).
Try a WAMP 32 bit version. http://www.wampserver.com/en/#wampserver-32-bits-php-5-4
Also if Apache and my-sql are of no consequence to you (they are just a web sever and and an sql database) you can install a WISP PHP Stack in a breeze using the web platform installer. http://www.microsoft.com/web/downloads/platform.aspx
For those of you using a 64bit version of PHP, the unofficial dll files linked below will work:
http://robsphp.blogspot.co.uk/2012/06/unofficial-microsoft-sql-server-driver.html
I am using 64bit WAMP on a 64bit Windows Server and was about to call it quits before I found those DLL files. It's odd that the official DLLs don't work with 64bit PHP, but I'm glad I at least found a solution.
I'm using just Apache 2.2 and PHP 5.4 in 32bit with SQLSRV 3.0 and it is now working. Note that the Thread Safe is set to Yes, thus SQLSRV ts.dlls should be used. It was a struggle. Hope this helps others.

PHP 5.4.16 and FreeTDS (php_dblib.dll): Unable to load extension

Goal
Connect to a MSSQL 2008 R2 server using the FreeTDS (php_dblib.dll 0.82 + 20110906 patches) Drivers for PHP 5.4.16 (VC9).
I am unable to use any alternative to FreeTDS unless the client also decides to use an alternative. This is unlikely unless they also run into this issue when upgrading their current version of PHP (currently 5.3.x) tomorrow.
Issue
PHP is unable to load the FreeTDS extension.
The Apache error log displays this on server start:
PHP Warning: PHP Startup: Unable to load dynamic library 'c:/wamp/bin/php/php5.4.16/ext/php_dblib.dll' - The specified module could not be found.\r\n in Unknown on line 0
As far as I understand it, the extension is either unable to be found or is the wrong version?
The extension directory location in the php.ini has been checked and triple checked and is:
c:/wamp/bin/php/php5.4.16/ext/
That leads me to believe it is the wrong version of php_dblib.dll. I've also checked that multiple times and made sure to use the version for PHP 5.4.X Thread Safe.
Steps Taken
Clean install of WAMP 2.4 with PHP 5.4.16 and Apache 2.4.4
Thread Safe php_dblib.dll placed in PHP extension directory
extension=php_dblib.dll added to the correct php.ini
extension=php_mssql.dll and extension=php_pdo_mssql.dll disabled in php.ini
msvcr71.dll (DotNet framework 1.1) added to PHP root directory
freetds.conf added to server root directory (c:)
System Details
WAMP Server 2.4
Apache 2.4.4
PHP 5.4.16 (VC9)
Thread Safety: enabled
FreeTDS Thread Safe (php_dblib.dll) 0.82 + 20110906 patches
Microsoft SQL Server 2008 R2
msvcr71.dll (DotNet framework 1.1) only included in the PHP root directory
EDIT:
WAMP 2.4 32-bit
OS: Windows 7 Pro 64-bit
EDIT 3
Last update only applied to the 64-bit version of WAMP. I've installed the 32-bit version, again, and --without-dblib is no longer in the configure command section of the phpinfo().
Questions
With the information given, is there anything else you'd need to know about to give an accurate assessment of the situation?
I am unable to find any, but are there any known issues with FreeTDS 0.82 and PHP 5.4.16?
Temporary Defeat
I've rolled back to PHP 5.3.x for now, FreeTDS works fine on that version. I'm not sure that it will make a difference with the little bit of code I am actually delivering to the client. This was intended to be a "double" check to make sure it all works perfectly, but since I'll be on site during the install I can fix any issues if they come up.
I would like to find a solution eventually since more and more of the systems I work with every day are going to be upgraded to php 5.4 and beyond.

Memcache extension for php - xampp windows not working

I have winginx on my windows machine which comes with memcached server and module. I have it running on port 11211. I have xampp on my machine as well and I need to connect to the memcached server through xampp. I used this tutorial to add the php_memcache extension to my php-xampp. Also, referenced here and here at stackoverflow. I have xampp version 1.7.4 with PHP 5.3.5 (VC6 X86 32bit).
I still get the error "class Memcache not found" or "call to undefined function memcache_connect()".
Is there a problem with the php_memcache dll I am using - I have tried both x86 and 64 bit versions?
Any help is appreciated.
The issue was with the compiler versions mismatch(I had vc6 for php and memcache was build from vc9). One of the posts from this discussion states php has dropped support for vc6, so I reinstalled xampp which had php 5.4 with vc9. Used the memcache dll in http://windows.php.net/downloads/pecl/releases/memcache/3.0.6/php_memcache-3.0.6-5.4-ts-vc9-x86.zip and everythin worked fine!
Thanks for the help.

php_redis.dll not working in windows

I tried both the files from here: https://github.com/nicolasff/phpredis/downloads. I am using 64bit wampserver on windows 7 professional. It looks like apache is trying to load the file but somehow could not recognize it properly. This is what I see in the error log:
PHP Startup: Unable to load dynamic library
'D:/wamp/bin/php/php5.3.13/ext/php_redis.dll' - %1 is not a valid
Win32 application.
Anyone faced similar issues? Do we have a working solution for this?
Just in case it can help someone, I managed to solve the error on PHP 7.1.12 installing the 32 bits DLL.
I was getting the error:
Warning: PHP Startup: Unable to load dynamic library '.../php_redis.dll'
not a valid Win32 application
But after installing the 32 bits version, the warning disappeared.
To know which architecture of XAMPP/WAMP are you using, visit the phpinfo() and look for the value "Architecture", it was for me on the fourth row, and as expected is had the value x86.
I had to check the Server API from phpinfo() to decide which version to use
If It's
Apache 2.0 Handler(mod_php) go with Thread Safe version
If It's CGI go with Non Thread Safe version
Unfortunately I do not run 64-bit version of PHP to test this, but for PHP 5.3 you can try this dll.
Dll from https://github.com/nicolasff/phpredis/downloads ( php_redis-2.1.3-5.2-vc6-ts-4350b2a.zip ), is working fine with PHP 5.2.17 (32-bit version).
I hope you will solve the problem.
I used XAMPP x86 / PHP 7.2.5 so I needed redis x86 and the directory is this: C:/xampp/php/ext/.
https://pecl.php.net/package/redis/4.1.0/windows
I'll add my ansewer to the table :
I used those dlls for my AMPPS server (WAMP should be the same) under windows 8 with PHP 5.5:
https://pecl.php.net/package/redis/2.2.7/windows
following this tutorial
https://www.linkedin.com/pulse/using-redis-windows-php-shekhar-joshi
I had same issue for 64 bit windows 7 wampserver with PHP5.5.12
and worked for me from below link dll binaries of Redis
http://windows.php.net/downloads/pecl/releases/redis/2.2.7/
I had the same case, I was installing wamp 32bit, but I imported the library in 64bit however I had to imorted the 32bit version.
Check in the task manager which version of wamp you are using!
For me the reason was version of Redis PHP extension that I've been used.
xampp architecture: x64
php version: 7.4
php type: ts (thread safe)
redis version installed on windows: 3.0.504
and finally the version of Redis PHP extension that worked for me was:
for php 7.4
latest stable version: php_redis-5.3.4-7.4-ts-vc15-x64
I downloaded it from this Link

Categories