Doc #76649 [Com]: cURL module requires libssh2.dll
From: laucomm at gmail dot com Date: Mon, 23 Jul 2018 12:25:55 +0000 Subject: Doc #76649 [Com]: cURL module requires libssh2.dll References: 1 Groups: php.doc.bugs Request: Send a blank email to doc-bugs+get-15922@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=76649&edit=1
ID: 76649
Comment by: laucomm at gmail dot com
Reported by: laucomm at gmail dot com
Summary: cURL module requires libssh2.dll
Status: Verified
Type: Documentation Problem
Package: cURL related
Operating System: Windows
PHP Version: 7.2.8
Block user comment: N
Private report: N
New Comment:
So here is the full deal:
cURL is not just an independent extension but depends on the 3 libraries libeay32, ssleay32 and
libssh2 as described in the note and comments section of it's current doc:
https://secure.php.net/manual/en/curl.installation.php
Because the extension depends on external libraries being available to the web server, the
distribution of those libraries with either the web server (Apache) or PHP is necessary. If the 3
libraries are alread being shipped with Apache, no steps are needed and cURL should just work fine.
If any one of the libraries is missing, the cURL module will not work.
The official Apache site lists the folling links as the first two recommendended download locations
for Apache binaries compiled for windows:
https://www.apachehaus.com/cgi-bin/download.plx
https://www.apachelounge.com/download/
The official binaries of PHP 7.2.8 for Windows are compiled against VC15.
The first location "ApacheHaus" does not provide VC15 compiled binaries, but
"ApacheLounge" (the second location) does.
In the VC14 compiled distribution of both Apache binary providers, the 2 libraries libeay32 and
ssleay32 are included, thus copying the missing libssh2.dll from the PHP distribution to the Apache
bin/ folder will successfully load the cURL extension.
The VC15 compiled Apache distribution (only available from "ApacheLounge") does not
include any of the needed 3 libraries. The older PHP distributions like PHP 7.1.9 did include all 3
needed libraries and made it possible to copy them to the Apache's bin/ folder. But the current
PHP 7.2.8 distribution does just include 1 of the needed libraries (libssh2.dll).
So because neither Apache 2.4. x64 (VC15) nor PHP 7.2.8 x64 (VC15) are being shipped with the
necessary libraries, they cannot be copied to Apache's bin/ folder.
This is not a simple documentation issue. PHP is not shipping all necessary libraries for cURL to
work under current conditions anymore.
Previous Comments:
------------------------------------------------------------------------
[2018-07-23 04:01:34] requinix@php.net
I was able to reproduce that cURL was not loaded, but copying libssh2.dll fixed it.
Did you do what I said about enabling logging? Did you check the Apache error log to see that PHP
complained about "module not found" when trying to load the extension?
And phpinfo() will show a section for cURL, even if its INI settings aren't included.
------------------------------------------------------------------------
[2018-07-22 19:34:47] laucomm at gmail dot com
I did read the following comments:
https://php.net/manual/en/curl.installation.php#122314
Though they appear to be out of date, I did try them out and copied the only one actually available
of the three suggested files (libssh2.dll) to the Apache bin/ folder and also tried loading it with
LoadFile (of course I restarted the service in between).
The function "curl_init()" is still undefined.
---
By the way, I guess because of the following fix to the PHP source, the INI settings of the loaded
cURL module might not be displayed in the phpinfo() output of PHP 7.2.8:
https://github.com/php/php-src/commit/b585f043cb0078d01e982ff034d64421a97d8e8f#diff-ac978e3de205f1d14eb960e0eb15ef24
---
Also, I have cURL running fine on the same machine with a PHP 7.1.9.
Is there anybody with a windows machine, Apache 2.4 x64 and PHP 7.2.8 x64 that can confirm this
issue?
------------------------------------------------------------------------
[2018-07-22 18:14:17] requinix@php.net
Oh. When in doubt with problems like this, make sure you have error logging enabled (including
display_startup_errors) and that you've checked the appropriate error logs.
------------------------------------------------------------------------
[2018-07-22 18:13:26] requinix@php.net
As the top three comments on the cURL installation page say,
http://php.net/manual/en/curl.installation.php
you need libssh2.dll in the path. The Apache download includes libcrypto and libssl but not libssh2.
Copying it from the PHP download to Apache's bin\ is sufficient.
Docs need updating.
------------------------------------------------------------------------
[2018-07-22 17:57:42] spam2 at rhsoft dot net
that only proves that you modified the config for the cli successful so hell look at phpinfo()
output which configs the webserver is using and enable display _startup_errors (I'm at a mobile
so please look for exactly name) and make sure you have set a proper writable error_log
when your cli can load the extension it is for sure a local config issue and as said this is the
wrong bug tracker
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
https://bugs.php.net/bug.php?id=76649
--
Edit this bug report at https://bugs.php.net/bug.php?id=76649&edit=1
Thread (12 messages)
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
- Unknown Message
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Com]: cURL module requires libssh2.dll
- Doc #76649 [Nab->Ver]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Nab]: cURL module requires libssh2.dll
- Doc #76649 [Ver->Csd]: cURL module requires libssh2.dll
| « previous | php.doc.bugs (#15922) | next » |
|---|