Bug #78086 [Asn]: Curl silently fails to load under mod_php

From: Date: Thu, 30 May 2019 16:39:43 +0000
Subject: Bug #78086 [Asn]: Curl silently fails to load under mod_php
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-221051@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=78086&edit=1

 ID:                 78086
 Updated by:         cmb@php.net
 Reported by:        alvaro at demogracia dot com
 Summary:            Curl silently fails to load under mod_php
 Status:             Assigned
 Type:               Bug
 Package:            Apache2 related
 Operating System:   Windows 10
 PHP Version:        7.3.5
 Assigned To:        cmb
 Block user comment: N
 Private report:     N

 New Comment:

Also check that there's no "wrong" DLL loaded.


Previous Comments:
------------------------------------------------------------------------
[2019-05-30 08:51:49] alvaro at demogracia dot com

Yes, I have. I'm actually using a symlink (mklink command) so the path never changes, I hope
that's not an issue.

According to Process Monitor, "httpd.exe" is trying to load "libssh2.dll" from
all sort of locations except PHP directory:

- Apache's base and "bin" directory
- C:\Windows\System32\libssh2.dll
- C:\Windows\System\libssh2.dll
- C:\Windows\libssh2.dll
- Graphics Magick directory
- Oracle Instant Client directory
- C:\Srv\PHP\PEAR\libssh2.dll

... so it's obviously not taking PHP folder into consideration. It's weird because this
same set-up works fine for 7.0, 7.1 and 7.2. I'll check everything again *sigh*

------------------------------------------------------------------------
[2019-05-30 08:27:57] cmb@php.net

Likely the dependent DLLs (such as libssh2.dll) can't be found.
Did you add the PHP folder to your PATH[1]?

[1] <https://www.php.net/manual/en/curl.installation.php>

------------------------------------------------------------------------
[2019-05-30 08:08:34] alvaro at demogracia dot com

My excuses, I hadn't found the correct log file. I'm getting:

PHP Warning:  PHP Startup: Unable to load dynamic library 'curl' (tried: ext\\curl (No se
puede encontrar el m\xef\xbf\xbddulo especificado.), ext\\php_curl.dll (No se encontr\xef\xbf\xbd el
proceso especificado.)) in Unknown on line 0

------------------------------------------------------------------------
[2019-05-30 08:01:07] alvaro at demogracia dot com

Description:
------------
Not sure if there's a problem with the Windows builds but I'm using
php-7.3.5-Win32-VC15-x64 under Windows 10 and the Curl extension doesn't load at all when
running PHP via Apache.

It works fine in command-line but not when running as module for Apache/2.4.29 (Win64) with the same
php.ini file, which is essentially identical to the one I was using successfully in
php-7.3.0-Win32-VC15-x64. I'm not getting error messages of any kind but the extension
doesn't show up in phpinfo() and it isn't avaible.

Test script:
---------------
var_dump(PHP_VERSION, defined('CURLOPT_HEADER'),
function_exists('curl_setopt'));

Expected result:
----------------
In command-line it prints:

string(5) "7.3.5"
bool(true)
bool(true)

Actual result:
--------------
In Apache it prints:

string(5) "7.3.5"
bool(false)
bool(false)


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=78086&edit=1


Thread (17 messages)

« previous php.bugs (#221051) next »