PHP unable to load php_curl.dll extension

后端 未结 13 2536
暖寄归人
暖寄归人 2020-11-29 08:58

Follow-up from my post yesterday (Enabling cURL with PHP)

The problem is that PHP isn\'t able to load php_curl.dll. I\'ve tried several steps including uncommenting

13条回答
  •  孤城傲影
    2020-11-29 09:45

    WINDOWS Apache 2.4.x + PHP 7.0.x SOLUTION HERE:

    Solution: Put libeay32.dll, libssh2.dll, ssleay32.dll files under dir specified in httpd.conf's ServerRoot directive. These dlls can be found compiled under php root folder.

    Reasons:

    Problem is php_curl.dll requires to access following libraries while loading: libeay32.dll, libssh2.dll, ssleay32.dll and it does not make sense if you put them in ./php/ext dir or if you put php extensions in php root dir.

    Of course you can put them in c:\Windows or in some global folder defined in PATH but if you dont want to do this and you want that your apache+php installation was portable:

    The path specified in ServerRoot in httpd.conf is treated as home path for php. The behaviour is similar to situation where you include ./path/to/some.php file in ./index.php and home path for some.php file is still ./ the dir where index.php resides.

    In shorts just put those three dlls right in dir you specified in httpd.conf ServerRoot directive and php_curl.dll will not fail to load again.

提交回复
热议问题