• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • 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.

Plesk 12 - Multiple PHP Versions - CLI?

futureweb

Regular Pleskian
Hey there,

for Apache it's no problem to switch the PHP Versions within Plesk - but how can I switch the PHP Versions within the Shell for Customers with Shell Access?

Thank you
Andreas Schnederle-Wagner
 
As for the PATH - this won't work as the Users on this Plesk Server only got CHROOTED ENVs ...
So I guess the only way is to add the correct Version manually to the CHROOT ... :-/

(not looked into the SCL yet)

Andreas
 
Hi futureweb,

you might be looking for a complete tutorial, so I would suggest you try this one: How to enable multiple PHP Versions in Parallels Plesk 11.5 and Plesk Automation 11.5 on Linux ( KB - article 118 378 ). :) ... and "yes" .. this is for Plesk 12 as well, and it has even been updated today.
Hi futureweb,

Hi,
I have PLESK 12/CentOS 6/php-5.3 and also use php-5.2.17 for soma domains.
Following your guide, I tried to install also php-5.1.6, however got following errors at step "Configure".Is the guide valid for any PHP version?
If not, could you send me the correct installation procedure for php-5.1.6?

[root@mysrv src]# cd /usr/local/src/php516
[root@mysrv php516]# ./configure '--with-libdir=lib64' '--cache-file=../config.cache' '--prefix=/usr/local/php516-cgi' '--with-config-file-path=/usr/local/php516-cgi/etc' '--disable-debug' '--with-pic' '--disable-rpath' '--with-bz2' '--with-curl' '--with-freetype-dir=/usr/local/php516-cgi' '--with-png-dir=/usr/local/php516-cgi' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr/local/php516-cgi' '--with-openssl' '--with-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-dir=/usr/local/php516-cgi' '--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=/usr/local/php516-cgi/pear' '--enable-intl' '--without-pdo-sqlite' '--with-config-file-scan-dir=/usr/local/php516-cgi/php.d' '--enable-cgi'

creating cache ../config.cache
checking for Cygwin environment... no
checking for mingw32 environment... no
checking for egrep... grep -E
checking for a sed that does not truncate output... /bin/sed
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for gcc... gcc
checking whether the C compiler (gcc ) works... yes
checking whether the C compiler (gcc ) is a cross-compiler... no
checking whether we are using GNU C... yes
checking whether gcc accepts -g... yes
checking whether gcc and cc understand -c and -o together... yes
checking how to run the C preprocessor... gcc -E
checking for AIX... no
checking whether ln -s works... yes
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking for re2c... no
configure: warning: You will need re2c 0.9.11 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking for bison... no
checking for byacc... no
checking for bison version... invalid
configure: warning: bison versions supported for regeneration of the Zend/PHP parsers: 1.28 1.35 1.75 1.875 2.0 2.1 2.2 2.3 (found: none).
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 3246: lex: command not found
configure: error: cannot find output from lex; giving up
[root@mysrv php516]#
 
checking for flex... lex
checking for yywrap in -ll... no
checking lex output file root... ./configure: line 3246: lex: command not found
configure: error: cannot find output from lex; giving up

Just install missing flex:

# yum install flex
 
Back
Top