PHP 5.3 installed through Plesk Installer, but sites are incompatible with PHP 5.3

Created:

2016-11-16 12:44:34 UTC

Modified:

2016-12-21 19:06:34 UTC

0

Was this article helpful?


Have more questions?

Submit a request

PHP 5.3 installed through Plesk Installer, but sites are incompatible with PHP 5.3

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

  1. Download the PHP source code archive:

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

  3. Copy the configuration file php.ini-dist from the source's directory to the php.ini file in the etc sub-directory of the custom PHP directory.

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

Have more questions? Submit a request
Please sign in to leave a comment.