开发者

Problem loading dynamic library in WAMP

开发者 https://www.devze.com 2023-01-14 02:48 出处:网络
I have downloaded a dynamic library from the 开发者_JS百科location: http://downloads.php.net/pierre/.

I have downloaded a dynamic library from the 开发者_JS百科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?


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


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.


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消