Applicable to:
- Plesk 11.x for Linux
- Plesk 12.0 for Linux
Symptoms
I have selected and installed PHP 5.3 in Plesk Installer and now my websites are broken.
Cause
Only one PHP version may be installed by Plesk Installer. Additional PHP versions should be built from source code and installed to a custom location.
Resolution
-
Download the PHP source code archive:
- From http://www.php.net/downloads.php for the latest versions of PHP.
- From http://www.php.net/releases/ for older versions.
-
Build and install PHP using the instructions provided at http://php.net/manual/en/install.php . Recommended configuration options are as follows:
./configure --with-libdir=lib64 --cache-file=../config.cache --prefix=/opt/php-5.2.12 --with-config-file-path=/opt/php-5.2.12/etc --disable-debug --with-pic --disable-rpath --enable-fastcgi --with-bz2 --with-curl --with-freetype-dir=/opt/php-5.2.12 --with-png-dir=/opt/php-5.2.12 --enable-gd-native-ttf --without-gdbm --with-gettext --with-gmp --with-iconv --with-jpeg-dir=/opt/php-5.2.12 --with-openssl --without-pspell --with-pcre-regex --with-zlib --enable-exif --enable-ftp --enable-sockets --enable-sysvsem --enable-sysvshm --enable-sysvmsg --enable-wddx --with-kerberos --with-unixODBC=/usr --enable-shmop --enable-calendar --without-sqlite3 --with-libxml --enable-pcntl --with-imap --with-imap-ssl --enable-mbstring --enable-mbregex --with-gd --enable-bcmath --with-xmlrpc --with-ldap --with-ldap-sasl --with-mysql=/usr --with-mysqli --with-snmp --enable-soap --with-xsl --enable-xmlreader --enable-xmlwriter --enable-pdo --with-pdo-mysql --with-pdo-pgsql --with-pear=/opt/php-5.2.12/pear --with-mcrypt --enable-intl --without-pdo-sqlite --with-config-file-scan-dir=/opt/php-5.2.12/php.d
Note: Use the custom path in the
--prefix
option (for example,/opt/php-5.2.12
) to avoid overwriting the PHP installed by Parallels Installer. -
Copy the configuration file
php.ini-dist
from the source's directory to thephp.ini
file in theetc
sub-directory of the custom PHP directory. -
Register the custom PHP version in Plesk:
/usr/local/psa/bin/php_handler --add -displayname 5.2.12 -path /opt/php-5.2.12/bin/php-cgi -phpini /opt/php-5.2.12/etc/php.ini -type fastcgi -id 5.2.12-custom
See also
- Administrator's Guide: Multiple PHP Versions
- #213412429 How to install and use two versions of PHP on the same Plesk for Linux server (Plesk versions 11.0 and earlier)
- #213406849 How to downgrade PHP 5.3 on CentOS 5.x/6.x
Comments
0 comments
Please sign in to leave a comment.