I am using PHP 5.5.25
with Apache 2.4
on Windows 7 x64
and I am unable to activate the cURL module. I have looked around and tried all I could think of. Please assist:
- In
php.ini
, the lineextension=php_curl.dll
is active and the filephp_curl.dll
is present in the extensions directoryC:\php\ext
- In
php.ini
when I setextension_dir = ext
, none of the extensions load. I get several messages when Apache starts, similar toUnable to load dynamic library
ext\php_openssl.dll- The specified module could not be found.
- When I use the full path and set
extension_dir = C:\php\ext
, all the extensions load fine, except for cURL. I get the error:Unable to load dynamic library
C:\php\ext\php_curl.dll- The specified module could not be found.
- I have tried renaming the extension to
php_curl.new.dll
and adjustingphp.ini
but I get an error message about the new filename. I have also downloaded a fresh new copy of the DLL fromwindows.php.net
, but that made no difference. - I have checked the file permissions for
php_curl.dll
(Right-click on the file >> Properties >> Security tab) and they are the same as the permissions for extensions that load successfully - I have copied and pasted
libeay32.dll
andssleay32.dll
from the PHP bin directory to the System32 and SysWOW64 directories as instructed by a response to this question - I am certain that I am editing the right
php.ini
since the PHP startup error messages changed when I changed theextension_dir
value fromext
toC:\php\ext
as I explained above. - I have made sure to restart the Apache server between
php.ini
configuration changes. - If in a PHP script I execute
var_dump(file_exists('C:\php\ext\php_curl.dll'));
, I getboolean True
so PHP can see the file!
What else could explain why the cURL module is not enabled?
C:\php
toC:\Windows\SysWOW64
may cause a problem later because when I change PHP versions I won't remember to overwrite those copies with the new versions' DLLs. I am thinking instead of addingC:\php
to the Windows PATH variable. This way all PHP DLL files can stay together and be easier to maintain. Do you see any big downside to that? – Humane