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
extension=php_curl.dll, making sure the dependencies
ssleay32.dll eixst in the path, re-downloading php_curl.dll, replacing the old one, and lastly copying the file into my System32 folder.
I'm using Apache 2.2 and PHP 5.4.14. I installed both using their individual packages; I'm not using XAMP or WAMP. I'm using Windows 7 64-bit.
Any help at all would be appreciated.
ssleay32.dllhave to be path-accessible for
php_curl.dllloading to succeed.
But copying them into Apache's
System32, or even worse into the Windows main directory is a bad hack and may not even work with newer PHP versions.
The right way to do it is to add the PHP path to the Windows
Control Panel -> Systemclick on Advanced System Settings or press WIN+R and type
Pathvariable. Edit it and prepend
C:PHP;to it - or whatever the path to your PHP folder is.
(Hint: If your PHP folder contains spaces like
C:Program FilesPHPyou may need to use the short filename form here, i.e.
I changed the instructions above to prepend the Path variable with the PHP path instead of appending to it. This makes sure that the DLLs in the PHP path are used and not any other (outdated) versions in other paths of the system.
If you have already chosen the wrong way and copied any of the PHP DLLs to Apache or Windows paths, then I strongly recommend that you remove them again! If you don't, you might get into trouble when you later try to update PHP. If a new PHP version brings new versions of these DLLs, but your old DLLs still linger around in system or webserver paths, these old DLLs might be found first. This will most certainly prevent the PHP interpreter from starting. Such errors can be very hard to understand and resolve. So better clean up now and remove any of the mentioned DLLs from Windows and Apache paths, if you copied them there.
(Thanks to @EdmundTam and @WasimA. for pointing out this problem in the comments!)
Tip: To find all copies of these DLLs and check whether you might have placed them in the wrong folders, you can use the following commands in a Windows Command Prompt window:
Be warned that these commands may take some time to complete as they search through the entire directory structure of your system drive C:.
If your PHP folder contains spaces (i.e.
C:Program FilesPHP) you may need to use the short filename form in the
Pathvariable at step 3 (i.e.
C:Progra~1PHP). Thanks to @onee for this tip!