Jump to content


Photo

US 13.4.0 PHP 7.3 cURL


  • Please log in to reply
7 replies to this topic

#1 Alfred

Alfred

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows 10

Posted 21 August 2019 - 06:48 AM

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!



#2 brainstorm

brainstorm

    Newbie

  • Developer
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Italy
  • SourceForge IDbrainstorm
  • Main OS: Windows 8.1

Posted 22 August 2019 - 12:03 PM

Have you seen this? https://stackoverflo...l-dll-extension



#3 Alfred

Alfred

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows 10

Posted 23 August 2019 - 01:56 AM

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. 



#4 regislg

regislg

    Newbie

  • Member
  • Pip
  • 2 posts
  • Gender:Male
  • Main OS: Windows 10

Posted 26 August 2019 - 04:07 AM

Hello Alfred,

 

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

 

php_curl_error.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.

Attached Files



#5 Alfred

Alfred

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows 10

Posted 26 August 2019 - 08:08 AM

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!

#6 brainstorm

brainstorm

    Newbie

  • Developer
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Italy
  • SourceForge IDbrainstorm
  • Main OS: Windows 8.1

Posted 01 September 2019 - 04:18 AM

Thanks for your reply, I will check this solution and will Update Uniserver to version 13.4.1.



#7 brainstorm

brainstorm

    Newbie

  • Developer
  • Pip
  • 7 posts
  • Gender:Male
  • Location:Italy
  • SourceForge IDbrainstorm
  • Main OS: Windows 8.1

Posted 01 September 2019 - 05:57 AM

Uniform Server 13.4.1 released with OpenSSL 1.1.1c, PHP 7.2 and 7.3 also updated to the latest. Let me know.



#8 Alfred

Alfred

    Newbie

  • Member
  • Pip
  • 4 posts
  • Main OS: Windows 10

Posted 01 September 2019 - 02:34 PM

Just installed the new version, works great!

Only one small detail: when I click "About" it still shows it's version 13.4.0.

Thanks for the quick and good follow up brainstorm!




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users