1
votes

I have downloaded a dynamic library from the location: http://downloads.php.net/pierre/.

The specific file I downloaded is: php_http-5.3-nts-svn20091125-vc6-x86.zip.

I have copied the file (php_http.dll) into the folder: C:\wamp\bin\php\php5.3.0\ext.

In php.ini, I added the line: extension=php_http.dll.

But I am getting the warning consisting of message: "PHP Startup: Unable to load dynamic library".

Do I need to do anything else to have this module enabled?

3
Strongly related to (if not a duplicate of) stackoverflow.com/questions/3634969/… - VolkerK
Yes, I realize they are addressing the same issue. Actually, in this thread I would like to know why would such loading error would occur, using my current problem as an example. - Shamim Hafiz - MSFT

3 Answers

2
votes

Maybe it's for a version other than your PHP's?

0
votes

There are several "attributes" that must be in agreement in both the php core and the extension module. You can find all those values for the php core in the output of phpinfo()

  • the API version (e.g. 20090626 for the current 5.3.3 version)
  • is it a thread-safe (ts) or a non-thread-safe (nts) build <- this one's apparently your problem.
  • is it a debug build
  • did the compiler used to build a) the core and b) the module produce compatible code?

An extension module dll can also have additional dependencies that may or may not be fulfilled, e.g. another .dll is referenced but not present. Amongst other tools you can use ProcMon to monitor which .dlls are looked for and which are un-/successfully loaded.

0
votes

For anyone that has tried the above "answers" without success, do this. Get the official Windows files from here. Make sure to (1) use the right version for your php and (2) use the right threading. Use NTS (not thread safe) if you are using fact cgi, and use thread safe if you have loaded php as an apache module.

http://windows.php.net/downloads/pecl/releases/http/

To verify it worked, look at the phpinfo() output and ensure there is a http section.