Jump to content
The Uniform Server Community

US 13.4.0 PHP 7.3 cURL


Alfred
 Share

Recommended Posts

Hello

 

Fresh installation of US 13.4.0. Selected PHP 73; activated php_curl.dll; but throws error after starting Apache.

 

"SSL_CTX_set_post_handshake_auth not found in DLL-file D:\uniserver\core\php73\extensions\php_curl.dll"

 

Any ideas?

 

Thanks!

Link to comment
Share on other sites

Yes, but that is OK I think. Path etc were already correct, no files copied to system32.

 

I've located on how to trigger the issue:

- Installing the new US in folder "uniserver"

- Older version in folder "server"

 

Running the new version, start without errors, but no curl. cURL is enabled, but not working, but also not showing errors. When i shutdown the new version, start the old version, stop and shutdown the old version, restart the new one, it throws the above DLL errors.

 

So basicly I can run a fresh installation of US with cURL enabled, without errors, but cURL not working (weird?). After working in the old version, the new one gets corrupted and throws errors.

Link to comment
Share on other sites

Hello Alfred,

 

I encountered the same error while installing GLPI (PHP Curl is an "optional" required PHP extensions) on Uniform Server 13.4.0.

 

post-7152-0-21262100-1566809306_thumb.jpg

 

To solve I did this :

Check file version from path (apache2) : ..\UniServerZ\core\apache2\bin
Check file version from path (php73)   : ..\UniServerZ\core\php73

File / Apache2 bin / PHP73
--------------------------
libcrypto-1_1.dll     : 1.1.0.7  | 1.1.1.3
libcrypto-1_1-x64.dll :          |
libcurl.dll           :          |
libsasl.dll           :          | 2.1.27.0
libssh2.dll           :          | existing (unknown version)
libssl-1_1.dll        : 1.1.0.7  | 1.1.1.3
libssl-1_1-x64.dll    :          |
nghttp2.dll           : 1.38.0.0 | 1.32.0.0
libeay32.dll          : 1.0.2.19 | 
ssleay32.dll          : 1.0.2.19 |

Solution is to copy (most recent version) files libcrypto-1_1.dll and libssl-1_1.dll from ..\UniServerZ\core\php73 to ..\UniServerZ\core\apache2\bin directories.

Then the curl extension seems to be ok (at least, well enough, to fulfill the GLPI installation requirements).

 

How do you check the curl extension is "really" working ? (i guess the GLPI installation just check it is "available")

 

The posts I read from :

Source : https://stackoverflow.com/questions/16424117/php-unable-to-load-php-curl-dll-extension

Chris Tsirkas, Jul 11 2018 at 14:13
-----------------------------------
Usually this is an OpenSSL version mismatch error, between Apache and PHP.

In case Apache loads PHP as a DSO module, its own OpenSSL versions (dlls and libs) will be used.
So, in case the PHP extension requires a newer version, it may not find the appropriate interface inside the Apache-loaded DLLS and it will fail to work.

Since you need the PHP extension to load, you need the relevant DLL files to be at least the version of what the PHP module asks for.
Supposing that you 're using lastest builds for both Apache and PHP and both having been built with the same MVC version, you can copy the following files:

    libcrypto-1_1.dll
    libcrypto-1_1-x64.dll
    libcurl.dll
    libsasl.dll
    libssh2.dll
    libssl-1_1.dll
    libssl-1_1-x64.dll
    nghttp2.dll
    libeay32.dll (if existing in your PHP distribution)
    ssleay32.dll (if existing in your PHP distribution)

from the PHP root folder to the Apache2/bin folder, in case you 're confident that the PHP build is newer than the Apache build.

In the opposite case, you can copy the same files from the Apache BIN to the PHP root.

In any case, backup the contents of the APache and PHP folders beforehand.

Adding the PHP path as an enviromental variable will give priority to this path for loading the relevant DLLs and may solve the problem.
However, you lose in server portability.
Additionally, if you have also added the Apache PATH as a variable and the OpenSSL versions are way different (up to loading different linked DLL files), a lot of shit may happen.


Rusty Fausak, Jul 28 2018 at 5:34
---------------------------------
I had to copy over libssl-1_1.dll and libcrypto-1_1.dll from my php7.2.8/ext folder to apache2.4.23/bin folder to get this to work.
Before that, I was receiving "Unable to load dynamic library" on php_curl.dll and php_openssl.dll despite those files existing in the correct place.

post-7152-0-21262100-1566809306_thumb.jpg

Link to comment
Share on other sites

How do you check the curl extension is "really" working ? (i guess the GLPI installation just check it is "available")

I used a small PHP file, or just check phpinfo. In my previous case, cURL was "on" in the config files, Apache started without errors, but cURL didn't show up.

<?php
if  (in_array('curl', get_loaded_extensions())) {
    echo "CURL is available on your web server";
} else {
    echo "CURL is not available on your web server";
}
?>
I re-tried copying the given DLL files to the Apache/bin folder and restarted my computer. Looks OK for now, which is strange as I already did this the last time (without restarting though). I'm not sure wat the cause of this issue was, but it is solved for now. Thanks!
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...