• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

11.5 Multi-PHP Error when registering PHP handler. (PHP 4.3.11 from source)

JTRipper

Regular Pleskian
Hi,

I'm using Plesk 11.5.30 on CentOS 6.4 with Apache 2.2.15.
I have successfully compiled and installed following handlers:
4.4.9 and 5.2.17,
but I have problem installing 4.3.11 I managed to compile properly :)

Here is the error:

/usr/local/psa/bin/php_handler --add -displayname "4.3.11" -path /usr/local/php-4.3.11/bin/php -phpini /usr/local/php-4.3.11/etc/php.ini -type cgi -id "fastcgi-4.3"
ERR (3) [util_exec]: proc_close() failed
Unable to register the PHP handler: can not get version from /usr/local/php-4.3.11/bin/php

So I tried
echo '<?php print phpversion(); ?>' |/usr/local/php-4.3.11/bin/php -q -c /usr/local/php-4.3.11/etc/php.ini
and I am getting:
4.3.11

Version check from command line reports correctly without segmentation faults

/usr/local/php-4.3.11/bin/php -v
PHP 4.3.11 (cgi-fcgi) (built: Oct 29 2013 11:40:56)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Below output from "/usr/local/psa/bin/php_handler --list"

id: display name: full version: version: type: cgi-bin: php.ini: custom:
cgi 5.3.25 5.3.25 5.3 cgi /usr/bin/php-cgi /etc/php.ini false
fastcgi 5.3.25 5.3.25 5.3 fastcgi /usr/bin/php-cgi /etc/php.ini false
fastcgi-52 5.2.17 5.2.17 5.2 fastcgi /usr/local/php-5.2.17/bin/php-cgi /usr/local/php-5.2.17/etc/php.ini true
fastcgi-44 4.4.9 4.4.9 4.4 fastcgi /usr/local/php-4.4.9/bin/php-cgi /usr/local/php-4.4.9/etc/php.ini true
fastcgi-54 5.4 5.4.20 5.4 fastcgi /opt/atomic/atomic-php54/root/usr/bin/php-cgi /opt/atomic/atomic-php54/root/etc/php.ini true
fastcgi-55 5.5 5.5.4 5.5 fastcgi /opt/atomic/atomic-php55/root/usr/bin/php-cgi /opt/atomic/atomic-php55/root/etc/php.ini true
module 5.3.25 5.3.25 5.3 module /usr/bin/php-cgi /etc/php.ini false

Is is possible the php_handler command does not recognize PHP 4.3.x ?

Any hints to solve this problem are greatly appreciated.
 
Hmm... stracing binary shows that version query algorithm changed. What does following command output?

# /usr/local/php-4.3.11/bin/php -q -v -c /usr/local/php-4.3.11/etc/php.ini
 
Hmm... stracing binary shows that version query algorithm changed. What does following command output?

# /usr/local/php-4.3.11/bin/php -q -v -c /usr/local/php-4.3.11/etc/php.ini


/usr/local/php-4.3.11/bin/php -q -v -c /usr/local/php-4.3.11/etc/php.ini

PHP 4.3.11 (cgi-fcgi) (built: Oct 29 2013 11:40:56)
Copyright (c) 1997-2004 The PHP Group
Zend Engine v1.3.0, Copyright (c) 1998-2004 Zend Technologies

Any clue ?
 
Well... that's your problem then. Does removing any options besides -v makes it return 0?

That's is a good question, but I do not want to spend half day to test all of switches I used for ./configure :)
For now I wrote simple wrapper to pass all parameters to php command (real binary) and forced return code 0 at the end.
php_handler is happy so am I :)

Thanks for the hint!
 
Good thinking. Would have suggested this myself, but people usually don't understand how to do such stuff properly.

Oh, and by previous question I actually meant "does at least php -v return 0?"
 
4.4.9 handler

Hi,

I'm using Plesk 11.5.30 on CentOS 6.4 with Apache 2.2.15.
I have successfully compiled and installed following handlers:
4.4.9 and 5.2.17

Really? How did you do 4.4.9?
I have the same system (Plesk 11.5.30 on CentOS 6.4 with Apache 2.2.15) and all I get is compiling-errors by trying to create a 4.4.9-Handle.
Could you please give me a hint?

THANK YOU!!!
 
Back
Top