Php curl on windows 10, php 5.6.17
I found an issue (after one full day on this problem).If you encounter the same problem, try this :
- open command prompt and go to your php directory root
- exec : deplister.exe ext\php_curl.dll
- check dependencies
For me the file libssh32.dll was missing, but it was in Windows/system32 and apache/bin. To solve the problem, i add the php directory in the path windows, and copy the file libssh32.dll in the php directory.
I had exactly the same problem with this dev-setup:
- Windows 10
- PHP 5.6.27
- Apache 2.2 (Yes, I know v2.4 is newer)
In PHP-CLI it works (php curl ext is loaded) but not when running through Apache (php curl ext is not loaded).
After spending a considerable time reading about this and trying different solutions it was *Jeremy that helped me most with the "deplister"-command.
It turns out (for me) the same dll-files (like libeay32.dll and ssleay32.dll) where present in various folders (like php/, apache/bin and windows/system32). However, even named the same, there where different versions of these, indicated by their different dates and sizes.
What made php-curl magically work for me was to replace libeay32.dll and ssleay32.dll in apache/bin with the newer versions I found in php/ (php root folder), and restart the apache service.
All these folders are present in the system PATH, but Apache obviously looks in it's own bin-folder first. So, I found it better to copy newer dll's to the Apache bin-folder, rather than relying on the system PATH.
Hope it may help someone else.
In addition to kapy47 answer: in my case I checked libssh2.dll in apache/bin and php directories they was different versions. I replaced with the newer versions in apache/bin and problem was solved