I've followed the answer to this question to the letter:
Connection between MSSQL and PHP 5.3.5 on IIS is not working
I'm using XAMPP with threadsafe 5.3. I've copied the files to the extension directory (while leaving them in the /php folder) and I've added the extension lines:
extension=php_sqlsrv_53_ts.dll
extension=php_pdo_sqlsrv_53_ts.dll
When I do this, Apache fails to start, giving me errors in eventvwr like:
Application popup: Warning : PHP Startup: Unable to load dynamic library
'C:\xampp\php\ext\php_sqlsrv_53_ts.dll'
- The specified module could not be found.
Except, obviously, that that file DOES exist in that spot, and php.ini is pointed at that extension directory.
What's the problem?
Windows reports this when a shared lib dependency of what you're loading is missing. Use depends.exe to view the dependencies of php_sqlsrv_53_ts.dll and make sure it's either previously loaded or in the shared library search path.
http://www.dependencywalker.com/
See below url
php_sqlsrv.dll: gives error when checking PHP version but extension works
Read it:-
Since PHP 5.3, Microsoft has a new driver for windows :
http://msdn.microsoft.com/en-us/sqlserver/ff657782.aspx
Maybe you can try this version, which seems quite recent (06/2011)
Hope that helps !
Sadly, none of the answers addressed the issue or were avenues I had already explored.
I have decided to use the ODBC drivers with a SQL Server connection string, which seems to work fine, minus the fact I can't use MSSQL and SQLSRV native functions.
I have written a page that might help when installing the SQLSRV driver:
http://robsphp.blogspot.co.uk/2012/09/how-to-install-microsofts-sql-server.html
Unfortunately the instructions got complicated when MSFT removed the download for the old XP/2003 driver (version 2.0), so read the whole page before starting.
Wrong technology, but I was having problems getting WAMP to connect to MSSQL, with the same types of errors.
I fixed the problem by installing the 32-bit version of WAMP (instead of 64, even though we were on a 64-bit system).
Even if that's not applicable to the OP, I hope someone finds this helpful!
I was getting the same error messages when I started the Drupal 7 stack after installation. I am using VM Ware with Win 7 x64 and acquia-drupal-win-7.31.36-6159.54300.
I went to the PHP site http://php.net/manual/en/sqlsrv.requirements.php and installed the x64 Package.
steps
1) Stop Drupal Stack
2) run the file: sqlncli.msi
3) restart Drupal, and no error messages.
Related
Okay.
I'm trying to use MongoDB with Node.js and PHP/XAMPP on Windows 7, but I can't seem to install the PHP MongoClient Class at all.
I am a complete beginner with MongoDB and I have to say that if I wasn't committed to solving this I'd have given up by now.
After lots of fiddling around trying to install the correct device driver version etc., I have come across yet another problem. But first, let me explain the steps I have taken so far.
Installed XAMPP v3.2.1, keeping all defaults.
Looked at phpinfo() on localhost:
PHP Version: 5.5.15. PHP Architecture: x86. Thread-Safe: Enabled.
Figured out where to download the software, as well as the correct version, etc.
Went to pecl.php.net/package/mongo/1.5.5/windows/.
At "DLL List" (PHP 5.5), I selected: `5.5 Thread Safe (TS) x86.
Went to PHP.ini (not the development or production version, but the actual one), and added 1 line: extension=php_mongo.dll. (line 887). No semicolon in front.
Started Apache.
Error: PHP Startup: C:\xampp\php\ext\php_mongo.dll could not be found on your computer.
I found out that when you manually type the file extension of a program that is already saved as a specific type, my computer simply prepends it to the existing one. The program was saved with the extension dll.dll. I got rid of that.
Restarted Apache.
Then I got this... Error: PHP Startup: Libsasl.dll is not found on your computer. Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll. Try reinstalling the program.
I reinstalled the program. As I suspected, no missing file was magically created.
I then looked online to try to find this 'dll' file. After some searching, I was able to install Libsasl.dll via dll-files.com.
I restarted Apache.
Next problem:
Error: PHP Startup: Unable to load dynamic library C:\xampp\php\ext\php_mongo.dll - Access is denied.
I tried running XAMPP as an administrator. Same result.
The program is definitely there, but I can't seem to access it for whatever reason.
Why? I am getting quite frustrated with this and I would love everything to start working properly.
I have a hunch that it has something to do with read/write privileges but I don't know where to look.
Some help would be appreciated.
I was facing same issue, then after adding the path of the ".dll" file's folder to the environment variable as a system variable path, it worked. It is then able to find the file. At the end that was the only step which was stopping xampp to load the ".dll" file, although it was present in that folder. Often people miss this step as it is no where pointed out clearly.
I'm using Ubuntu 12.04 LTS and needed PHP 5.4 so I'm using Ondřej Surý's (php5-oldstable) package.
Both phpinfo and the CLI show that JSON is enabled:
#php -i | grep -i json
json
json support => enabled
json version => 1.2.1
My application mostly works. But periodically (approx one page refresh in ten) there is a PHP error. This only happens intermittently.
PHP Startup: Unable to load dynamic library '/usr/lib/php5/20100525+lfs/json.so'
- /usr/lib/php5/20100525+lfs/json.so: cannot open shared object file:
No such file or directory "json.so"
How do I fix this?
I think that possible culprit (as I have answered in email) is that you are loading json extension somewhere from the configuration file.
The JSON extension is compiled in the core for PHP 5.4, so you should not load it by hand.
Please check that you don’t have:
json.ini somewhere in the /etc/php5/{mods-available} left over from previous PHP 5.5 installation
you are not loading JSON extension from the mentioned script, e.g. no dl(json.so).
Make sure you have stopped and started Apache2 (same applies to php5-fpm) when changing major versions. The symptoms might indicate that there was some stuck Apache2 thread with previous PHP from package loaded (that would be PHP 5.5 with json-c based JSON extension in this case).
Since you're saying that the json extension is loaded in phpinfo()'s output you could be dealing with a bug. Have you checked if the module file is actually there in the filesystem?
You have the following options:
Compile PHP 5.4 from source with Apache 2.4
Upgrade to the same repo's stable version which will give you PHP 5.5 + Apache 2.4.
Submit a bug with the Ondrej in Ubuntu's PPAs and wait for it to be resolved.
For more information check the debphp site.
Submitting a bug is a must, since if it is a real one it must be fixed for all users.
You could firstly go with option 2 if you don't conflict with the Migration guidelines like backward compatibility, deprecated functions, etc.. SO check it and decide.
It also strongly varies depending on the machine you have to do this with. If it is a critical production server, you may not want to compile of change versions on it. Go file the bug and see what the package maintainers have to say about this.
Also please write a reply here when your problem is resolved. I am quite curious as to what it is and hopefully was. :D
One point that doesn't diagnose or solve the issue (and seems to refer to PHP 5.5), but might help with tracing its root cause:
This Debian bug report and Phil Sturgeon's blog explain that some Linux distributions have chosen to replace the official PHP implementation of ext/json with the drop-in compatible pecl-json-c. The rationale was that Douglas Crockford's implementation contains a non-free clause in the license ("The Software shall be used for Good, not Evil"). See also this blog post.
Okay, so far ive been googeling and trying to find a solution for over 6 hours. normally i dont post questions because i feel the answer should be findable, but here goes nothing.
I need to work with PHP code that has implemented the memcache class. I use wampserver 2.2 as 64 bit install, with apache 2.2.2, php 5.4.3 (installed 5.3.13 too, to see if i could fix it in that version) and mysql 5.5.24
i have run the memcache service with both the memcached-win64-1.4.4-14.zip link and the memcached-1.2.6-win32-bin.zip link
I am now at a point where the feedback from wampserver i get is the following when (re)starting the apache module -> mem_cache_module, using the answers from a similar thread on stackoverflow.com/questions/3894065/php-memcache-dll-vc6-x64), in combination with php 5.3.13 64 bit:
PHP Startup: memcache: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match
This is a lot further than i got with the other options, most (or all) results i can come up with seem to redirect to either a 32 bit dll (which i cant use since my wampserver is 64 bit) or with the wrong php version or api version (compilation date?) .. i do not think i am able to compile my own library to solve this.
I have added *extension=php_memcache.dll* to both php.ini files for both php versions and the dll files have been placed into the correct php/php5.x.x/ext/ folders of the wamp server
my assumption so far is that i need the php_memcache.dll compilated for 64 bit (x64) for php 5.3.13 on the 25th of may, 2010. That or i need to install a php version matching the binairy compiled on the 26th of june, 2009.
Do any of you have a soltion to my specific dillemma? Any help will be greatly appriciated.
I tried all dlls and none worked but suddenly the one given in comment by falcontoast http://www.mediafire.com/?8d3vd26z3fg6bf1 did work.
Will be glad if it works for someone :).
One must check architecture of the phpversion from phpinfo() and must use corresponding dll file. Also the version for memcached service should be of same type.
Try following steps that might work for you. Yes it did work for me when I almost gave up.
1 - Close all memcached services if any already running.
2 - get this service memcached-win64-1.4.4-14(find it) and install it and then start.(the ways to install are already given out there).
3 - get the dll file in comment by falcontoast and put that in extension(ext) folder.
4 - do the changes in php.ini file.
5 - restart the wamp server(probably exit it and then again start it).
If everything is done properly, then the program given here https://commaster.net/content/installing-memcached-windows should work fine.
Basically you need Memcache OR Memcached Library that match your PHP Executable. When I say match I'm not speaking of date but of code. The old PHP won't support new Memcache and vice-versa.
You can try to compile a special one just for your version of PHP (I tried once with other libraries it's not fun). Or you can find a version of PHP that would work with a version of Memcache but this new PHP will also need to work with your version of Apache...
After years of playing with that I just gave up and just used a unix system.
PS: Now that I think about it PHP already come with a correct version of Memcache... So your error may be just that you're using "new Memcached();" instead of "new Memcache();"
Thank you zzarbi!! Freaking finally, I have tried all possible dll's out there and the one you provided finally worked, all others gave Invalid Win32 application.
My setup is Wamp 64 bit with Apache : 2.4.4 MySQL : 5.6.12 PHP : 5.4.12 on Windows 8 64bit
I have a problem that curl is not showing in phpinfo as i am using wampserver(64 bit) but when i open php and then php extensions a tick is placed in front of php_curl in my wamp server but still curl is not displayed in phpinfo.
Can anyone help me?
I ran into this issue myself a couple of days ago, the only way I could fix it is by installing apache addon version 2.2.9 and php addon version 5.3.1
Both are available in the addons section of the download page at http://www.wampserver.com/en
EDIT::
This only happened to me on my 64bit laptop, my 32bit desktop runs the latest versions just fine with no issues
Also... if you look in (C):\wamp\logs\apache_error (or whatever path you've installed to) I suspect you will see an error similar to this..
PHP Warning: PHP Startup: Unable to load dynamic library
'c:/wamp/bin/php/php5.4.3/ext/php_curl.dll' - The application has
failed to start because its side-by-side configuration is incorrect.
Please see the application event log or use the command-line
sxstrace.exe tool for more detail.\r\n in Unknown on line 0
Since this question is fairly old now and since I've experienced this issue again on my new laptop, and other users have visited the answer I've given here.. It appears if you use the 32bit installation of wampserver, even on a 64bit platform, this issue doesn't occur and it's the easiest way to avoid it.
I had the same problem with curl library on Windows 7 x64 but i just downloaded fixed version of php_curl.dll library from here: http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/ and it was well.
This is where I finally found my answer:
PHP cURL not working - WAMP on Windows 7 64 bit
There, Matthieu Napoli says:
Go to
http://www.anindya.com/php-5-4-3-and-php-5-3-13-x64-64-bit-for-windows/
and download the curl version that corresponds to your php version
under "Fixed curl extensions:".
So if you have php 5.3.13, download "php_curl-5.3.13-VC9-x64.zip". Try
the "VC" version first. Then replace the php_curl.dll in ext folder.
This worked for me.
I have set up a XAMPP installation on a windows server 2008 R2 that includes:
Apache 2
PHP 5.3.x
MySQL (not used anyway)
Then I have installed PostGreSQL 9.x. I have uncommented the pgsql pdo dlls in the php.ini file accordingly but when I try to connect to pgsql I get 'driver could not be loaded'. I am stuck as I couldn't come across a fix to that on the internet, I have tried adding the path of the pgsql installation (bin and lib dirs) to the PATH environement system but the problem persists. I have also rebooted the system many times after changing any configuration to ensure it is saved and applied but still same outcome.
I have read in a nonclear conversation that this might be related to the versions but couldn't find anything further.
If you have succeeded in performing the latter I would be greateful if you could provide me with some insight. (I am open to any alternatives except downgrading to older software versions).
Thanks so much for your time
Fixed by manually installing apache2 and php instead of going through xampp (or wampp). It seems those are buggy when it comes to the latest php version and pgsql pdo driver.