Can't find ordinal with two PHP versions

Problems with the Windows version of XAMPP, questions, comments, and anything related.

Can't find ordinal with two PHP versions

Postby musicmaster » 11. September 2018 14:33

Hi,

As I needed two PHP versions (7.2 and 5.6) I followed the rules that I found on some places on the internet:
- I installed the newest Xampp for PHP 7.2
- I copied the PHp directory from my old Xampp installation with PHP 5.6 and renamed it to PHP5
- I adapted a separate version of httpd-xampp.conf that I use when I want to use PHP 5.6.

It mostly works. However, I get two error messages (popups when php starts) when I try to run the 5.6 version:
Can't find ordinal 407 in DLL-file C:\xampp\ext\php_curl.dll
Can't find ordinal 314 in DLL-file C:\xampp\ext\php_openssl.dll


Other modules are loaded successfully. Just these two give problems. If you look at the urls in the error messages it is clear what goes wrong: it uses the ext path directly below the Xampp directory instead of the path that I defined in php.ini (extension_dir="C:\xampp\php5\ext").

Does anyone have an idea what is going wrong here? And how I can fix it?
musicmaster
 
Posts: 34
Joined: 07. July 2016 19:47
XAMPP version: latest
Operating System: Windows

Re: Can't find ordinal with two PHP versions

Postby musicmaster » 11. September 2018 14:38

As an experiment I copied those two files to a (newly created) ext directory directly under Xampp. It doesn't solve my problem. I now get the same error message but now for the C:\xampp\php5\ext\ path. (and they are still there too...)
musicmaster
 
Posts: 34
Joined: 07. July 2016 19:47
XAMPP version: latest
Operating System: Windows

Re: Can't find ordinal with two PHP versions

Postby Nobbie » 11. September 2018 16:04

"Ordinals" are numbers for funcions in that DLL. I think you should copy these extensions as well from c:/xampp/ext to c:/xampp/php5/ext (or similar) and load them from that folder, so you load different DLLs for different PHP versions. Remove them from c:/xampp/ext in order to avoid collisions.
Nobbie
 
Posts: 13170
Joined: 09. March 2008 13:04

Re: Can't find ordinal with two PHP versions

Postby musicmaster » 11. September 2018 18:48

There is no c:/xampp/ext. I created one for the test.

I tried updating all references inside files in the PHP5 directory but that didn't make a change either.
musicmaster
 
Posts: 34
Joined: 07. July 2016 19:47
XAMPP version: latest
Operating System: Windows

Re: Can't find ordinal with two PHP versions

Postby gsmith » 11. September 2018 23:47

The problem is with openssl versions.

php_curl & php_openssl in PHP 7.2 use OpenSSL 1.1.0,
php_curl & php_openssl in PHP 5.6 use OpenSSL 1.0.2
Apache 2.4.x loads whichever OpenSSL version it was compiled against (in /xampp/apache/bin).

When PHP is loaded as an Apache module it's running in the Apache process so will use the OpenSSL Apache is using.
OpenSSL 1.0.2 and 1.1.0 are not compatible. They do not even have the same dll names (ssleay32.dll/libeay32.dll in php5.6 vs. libcrypto-1_1.dll/libssl-1_1.dll in php7.2). Now which do you see in your Apache's /bin folder?

The only alternative is not loading php in Apache but loading mod_fcgid which then runs whatever version/s of php it's configured to use in a separate process.
gsmith
 
Posts: 278
Joined: 29. November 2013 18:04
Location: San Diego
XAMPP version: 0.0.0
Operating System: Win 10/2012R VS 14,15,16

Re: Can't find ordinal with two PHP versions

Postby musicmaster » 12. September 2018 06:09

gsmith wrote:The problem is with openssl versions.


Thank you for the explanation. That doesn't sound good.

I have two questions:
- is there a similar explanation for the Curl module?
- this is for development on a localhost, so SSL is not really needed. Can't this warning be ignored?
musicmaster
 
Posts: 34
Joined: 07. July 2016 19:47
XAMPP version: latest
Operating System: Windows


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 121 guests