Doc #76649 [Com]: cURL module requires libssh2.dll
From: laucomm at gmail dot com Date: Mon, 23 Jul 2018 14:17:25 +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-15926@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: @requinix@php.net I do believe you, that you reproduced the issue on your end and found a working solution. But I also believe, that the solution does not work on my end and that I did not misconfigure anything. I will restore the VM I used to a vanilla state and reinstall Apache und PHP again with all the necessary steps, but I will take at least take 48h since I have to do some actual work first. I'll see if I can record of video to document the process in case copying the libssh2.dll will again not resolve the issue. Whatever the result, I will report back how it went. Thanks for the patience! Previous Comments: ------------------------------------------------------------------------ [2018-07-23 14:04:26] laucomm at gmail dot com @ab The problem I see is, that only 1 of the 3 needed libraries for cURL is provided in the current PHP distribution. So if you don't download an old distribution of PHP or Apache to get the 2 missing libraries, you will not be able to get cURL to work with VC15. So I suggest to include all 3 libraries again with upcomming Windows PHP distributions. ------------------------------------------------------------------------ [2018-07-23 14:00:30] requinix@php.net I just downloaded PHP from that earlier link you posted, > https://windows.php.net/downloads/releases/php-7.2.8-Win32-VC15-x64.zip) and it still has the three DLL files required for php_curl.dll to work: libcrypto-1_1-x64.dll, libssl-1_1-x64.dll, libssh2.dll. Just like it did yesterday when I downloaded it then. I also just now went to the Apache Lounge to get their files. Again. Their VC15 also has libcrypto and libssl too but it does not have libssh2. My answer about copying the libssh2 file was not some random guess: I reproduced your problem, identified the cause as the missing dependency, copied the file like I said, and it worked. I don't know what files you're getting from where, but you're doing something wrong. ------------------------------------------------------------------------ [2018-07-23 13:28:27] ab@php.net @laucomm thanks for the report. @requinix already has pointed to the right solution - either the DLLs need to be copied or at least be on teh path. That was your initial issue, as cli showed curl loaded on your side. With regard to openssl - PHP 7.2 is shipped with OpenSSL 1.1.0 by default. If you need to use PHP as Apache module, then Apache needs to be linked with same OpenSSL version and same CRT. Apache Lounge are recommended Apache builds. Perhaps it needs to be documented, whereby i'm not sure what exactly. With the DLL names - it's an implementation detail, the constellation can change in future. Perhaps one should document, if it isn't done already, that the PHP dir needs to be ensured to be on the path if used as Apache module. Thanks. ------------------------------------------------------------------------ [2018-07-23 12:25:55] laucomm at gmail dot com 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. ------------------------------------------------------------------------ [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. ------------------------------------------------------------------------ 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 (#15926) | next » |
|---|