• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Multiple PHP Versions not real multiple

PaulHeider

New Pleskian
I followed this tutorial. Everything was okay, but the version does not change.

/usr/local/psa/bin/php_handler --list ouputs this:

Code:
           id:  display name:  full version:  version:    type:           cgi-bin:                php.ini:  custom:
  4.4.9-custom          4.4.9          5.3.2       5.3      cgi   /usr/bin/php-cgi  /usr/local/lib/php.ini     true
           cgi          5.3.2          5.3.2       5.3      cgi  /usr/bin/php5-cgi   /etc/php5/cgi/php.ini    false
       fastcgi          5.3.2          5.3.2       5.3  fastcgi  /usr/bin/php5-cgi   /etc/php5/cgi/php.ini    false
        module          5.3.2          5.3.2       5.3   module  /usr/bin/php5-cgi   /etc/php5/cgi/php.ini    false

What went wrong?
Thanks for help.
 
Are you sure that correct path to PHP CGI binary file is /usr/bin/php-cgi but not /usr/local/bin/php-cgi ?
 
I think so. I generated the handler with:

/usr/local/psa/bin/php_handler --add -displayname 4.4.9 -path /usr/bin/php-cgi -phpini /usr/local/lib/php.ini -type cgi -id 4.4.9-custom
 
Code:
# /usr/local/bin/php-cgi --version
/usr/local/bin/php-cgi: No such file or directory

# /usr/bin/php-cgi --version
PHP 5.3.2-1ubuntu4.19 with Suhosin-Patch (cgi-fcgi)

Where is my php 4.4.9 binary? How can I find it?

Code:
# updatedb 
# locate php-cgi
/etc/alternatives/php-cgi
/etc/alternatives/php-cgi-bin
/etc/alternatives/php-cgi.1.gz
/usr/bin/php-cgi
/var/lib/dpkg/alternatives/php-cgi
/var/lib/dpkg/alternatives/php-cgi-bin

Is it possible, that anything was wrong with building PHP (step 2 and 3 of the tutorial)?
 
With this tutorial, I have successful installed 5.4.17 as second php version.

Installing PHP CLI binary: /usr/local/bin/
Installing PHP CLI man page: /usr/local/php/man/man1/
Installing PHP CGI binary: /usr/local/bin/
Installing build environment: /usr/local/lib/php/build/
Installing header files: /usr/local/include/php/
Installing helper programs: /usr/local/bin/
 
Last edited:
Hello All,

I'm sorry to ask you, but it seems I forgot something during the installation...
I don't see any change on my PHP version (information by phpinfo) after following the procedure.

I registered my PHP 4.4.9 version in the Handler but no change occurs...

I'm sure that I have this problem because I'm new to programming so I'm sure it's my entiere fault if it doesn't works...

- Is there any inevitably required things to put in this function ? "./configure" If yes, may someone should be friendly to give me an exemple for PHP 4.4.9 on Ubuntu 12.04.2 LTS...

- When "make install" finished, if there some particular tasks to do ?

- In the Tutorial it said to use "cp php.ini-development /usr/local/lib/php.ini"
We agree that the php.ini-development file is the one that is located on the installation directory at the end ?
Is there any additionnal configuration to do with this file or can we use it without make any change ?

- I installed the same PHP version as PaulHeider but I can't find the CGI binary at the same path... Is it normal ? "/usr/local/bin/php"

I would thank you all the people that could help me :)

Best regards,
Baptiste.
 
Hi! This is minimal instruction for adding php 4.4.9 to plesk

apt-get install gcc flex
wget http://us1.php.net/distributions/php-4.4.9.tar.gz
tar xfvz php-4.4.9.tar.gz
cd php-4.4.9
./configure --prefix=/usr/local/php449
make && make install
cp php.ini-dist /usr/local/lib/php.ini
plesk bin php_handler --add -displayname 4.4 -path /usr/local/php449/bin/php -phpini /usr/local/lib/php.ini -type cgi

PS: all actions with the server you're making at your own risk
 
We have already submitted request for documentation correction (#139620 for your reference) We will make it more clear.
 
Hello,

I would like to thank you Cheshire because the commands you gives works well :)
I have been able to install php4.4.9 and php5.2.13 with those commands !

Thank you again :)
Best regards,
Baptiste.
 
Hello again,

Sorry to ask again something but I just realized that PHP doesn't support Mysql with that kind of configuration...

So I tried to reinstall PHP 5.2.13 with Mysql support, all is fine untill I see this error during "./configure"
checking for MySQL support... yes
checking for specified location of the MySQL UNIX socket... no
checking for MySQL UNIX socket location... /var/run/mysqld/mysqld.sock
configure: error: Cannot find libmysqlclient under /usr.
Note that the MySQL client library is not bundled anymore!


The command I'm using is :
'./configure' --prefix=/usr/local/php449 '--disable-cli' '--disable-discard-path' '--disable-force-cgi-redirect' '--with-libdir=/usr/lib/x86_64-linux-gnu' '--with-pear=/usr/share/php5' '--with-png-dir=/usr --other-options' '--enable-exif' '--enable-ftp' '--enable-bcmath' '--with-libdir=lib64' '--with-png-dir' --with-jpeg-dir=/usr/local/lib '--enable-calendar' '--enable-gd-native-ttf' '--with-freetype-dir' '--with-gettext' '--with-zlib-dir' '--with-xpm-dir=/usr' '--with-openssl' '--with-kerberos' '--enable-sysvsem' '--enable-sysvshm' '--enable-mbstring=all' '--enable-mbregex' '--with-mysql' '--with-mysqli' '--with-curl' '--with-xsl' '--with-pdo-mysql' '--with-pspell' '--enable-zip' '--enable-soap' '--enable-cgi'

Why is it not able to find it ?
I tried to define some paths to it but it don't works either...

Best regards.
 
Use this: './configure --prefix=/usr/local/php449 --with-mysql --with-mysql-sock' for mysql support.

Note that php 4 has old mysql client and you should use old password for mysql users:
mysql> SET PASSWORD FOR 'some_user'@'some_host' = OLD_PASSWORD('newpwd');
 
Back
Top