php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #68208 curl package not loading no error
Submitted: 2014-10-10 18:37 UTC Modified: 2014-10-13 14:58 UTC
From: admin at ctrlcube dot com Assigned:
Status: Closed Package: cURL related
PHP Version: 5.6.1 OS: windows 7
Private report: No CVE-ID: None
 [2014-10-10 18:37 UTC] admin at ctrlcube dot com
Description:
------------
Upgrading to php 5.6.1 curl no longer is recognised. No errors on server start package just not available. Replaced the php_curl.dll from 5.6.1 with the version from 5.6.0 and everything works fine. Running Apache 2.4.10 on Windows downloaded from Apache Lounge, and PHP package from windows.php.net. 

Test script:
---------------
$ch = curl_init();

Expected result:
----------------
no error

Actual result:
--------------
Fatal error: Call to undefined function curl_init() 

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2014-10-13 08:46 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-10-13 08:46 UTC] ab@php.net
Cannot reproduce here, ext/curl loads fine. Please ensure you have all the dependency DLL on the %path% and the %path% is correct.

Thanks.
 [2014-10-13 09:49 UTC] admin at ctrlcube dot com
-Status: Feedback +Status: Open
 [2014-10-13 09:49 UTC] admin at ctrlcube dot com
"C:\Program Files (x86)\PHP;" was already defined, added "C:\Program Files (x86)\PHP\ext;"

Still not seeing curl. If I swap curl dll file for previous version (5.6.0) curl works fine. 

Any other way of debugging what is going on?
 [2014-10-13 10:04 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-10-13 10:04 UTC] ab@php.net
Yes, you can start apache on console with -X, then you'll see what it probably misses. Be sure to set path=php_path;%path% before on that particular term. And, you can try the same on console while in php dir like - php -n -d extension_dir=ext -d extension=php_curl.dll ... Note that there's no need adding the ext folder to the path as it's only usable for the extension_dir directive. But when apache starts, it does chdir to its own root, that's where the correct %path% is set.

Maybe also try to put PHP and Apache into some path without spaces, I could imagine that to be an issue for Apache. Or at least escape the spaces like "Program\ Files".

Thanks.
 [2014-10-13 10:07 UTC] ab@php.net
Escaping not in the %path%, but in httpd.conf, i mean :)
 [2014-10-13 10:16 UTC] admin at ctrlcube dot com
-Status: Feedback +Status: Open
 [2014-10-13 10:16 UTC] admin at ctrlcube dot com
thanks, I'll look into that, just one quick question. I had a quick look at the source for the curl dll (\php-5.6.1\ext\curl\) for 5.6.0 and 5.6.1. They appear to be identical. the package.xml stating version 5.0rc1. However the curl ddl (php_curl.dll) sourced with 5.6.0 was 494KB and 5.6.1 was 403KB... sha1 hash for PHP download was fine, sha1 for 5.6.1 php_curl.dll is 73ef5e0e0bc3e9b04ec3395fb41bde6d62c4b475. Any idea why this might be the case?
 [2014-10-13 10:49 UTC] admin at ctrlcube dot com
ok, apache and PHP moved to path with no spaces. Windows path, php.ini, apache conf file all updated, still the same issue... Let's see I might just wait for 5.6.2 and skip 5.6.1 on my live server...
 [2014-10-13 13:52 UTC] ab@php.net
-Status: Open +Status: Feedback
 [2014-10-13 13:52 UTC] ab@php.net
Hm, good that you mention the size - my x64 copy downloaded three days ago has php_curl.dll of size 447kb. A x86 one should be around 400kb. Have you downloaded yours earlier than October 2nd? As the 5.6.1 release was the delayed one. 

Also 5.6.1 should be the release where upgrade to libcurl 7.38.0 happened. I think it's better to figure out now what's wrong as if that's a build issue, waiting for 5.6.2 will not help. Maybe you could check this http://windows.php.net/downloads/snaps/php-5.6/r37a685f/ or one of any latest snaps.

Also please tell what was the php console test and manual apache start with -X showing. If php.exe loads it, the issue is most likely somewhere else. Btw, there's deplister.exe in the php dir, point it to a dll file and it'll show it's deps.

Thanks.
 [2014-10-13 14:58 UTC] admin at ctrlcube dot com
-Status: Feedback +Status: Closed
 [2014-10-13 14:58 UTC] admin at ctrlcube dot com
ok, solved! 

deplister.exe showed a missing dependent dll. Brill!

Thanks SO much for your help...
 [2014-10-26 02:24 UTC] iandroid7 at gmail dot com
I had the same issue on php 5.6.2. Solved the same way as author mentioned (took php_curl.dll from 5.6.0 build).

D:\PHP 5>deplister ex\php_curl.dll
php5ts.dll,OK
LIBEAY32.dll,OK
WS2_32.dll,OK
SSLEAY32.dll,OK
libssh2.dll,OK
WLDAP32.dll,OK
Normaliz.dll,OK
KERNEL32.dll,OK
MSVCR110.dll,OK
 [2014-11-21 15:11 UTC] herb at bobbingwide dot com
I had the same problem but for PHP 5.5.18.

The fix was to ensure that the system PATH includes the PHP directory ( c:\php in my case ). Without it, when the service is started, apache is not able to find the new dll ( libssh2.dll ) upon which php_curl is dependent.  

See: https://bugs.php.net/bug.php?id=68047
 [2014-12-14 01:10 UTC] starams5 at gmail dot com
thanks herb at bobbingwide dot com.  I had the user variable path set,  i added the path to the system variable as you suggested and it worked like a charm.  much appreciated.
 
PHP Copyright © 2001-2021 The PHP Group
All rights reserved.
Last updated: Thu Dec 02 19:03:38 2021 UTC