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

Problem with Multiple PHP versions

MiladG

New Pleskian
Hi,
I installed some custom php versions using this thread:
http://forum.parallels.com/showthread.php?290399-Plesk-11-5-Easy-Install-Script-for-Multiple-PHP-CentOS-6-4-x64

but when I change to custom versions in plesk panel for a domain, I get Error 500.
I think I did something wrong.

I created a phpinfo file info.php,
this is error_log for a request:
Code:
[Sat May 31 12:31:13 2014] [warn] [client xx.xx.xx.xx] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server 
[Sat May 31 12:31:13 2014] [error] [client xx.xx.xx.xx Premature end of script headers: info.php

and here is php_handler list:
Code:
[root@server ~]# /usr/local/psa/bin/php_handler --list
                                       id:  display name:  full version:  version:    type:                               cgi-bin:                               php.ini:  custom:
  632e4f213cd605b7238406ee4683bfff38c19997         5.4.28         5.3.28       5.3  fastcgi      /usr/local/php540-cgi/bin/php-cgi          /usr/local/php540-cgi/php.ini     true
                                       cgi          5.3.3          5.3.3       5.3      cgi                       /usr/bin/php-cgi                           /etc/php.ini    false
                                   fastcgi          5.3.3          5.3.3       5.3  fastcgi                       /usr/bin/php-cgi                           /etc/php.ini    false
                            fastcgi-5.3.28         5.3.28         5.3.28       5.3  fastcgi      /usr/local/php-5.3.28/bin/php-cgi      /usr/local/php-5.3.28/etc/php.ini     true
                            fastcgi-5.4.29         5.4.29         5.4.29       5.4  fastcgi  /usr/local/php-5.4.29-cgi/bin/php-cgi  /usr/local/php-5.4.29-cgi/etc/php.ini     true
                                    module          5.3.3          5.3.3       5.3   module                       /usr/bin/php-cgi                           /etc/php.ini    false

any help would be appreciated...
 
Amazingly - I managed to install multiple versions using the Centos SCL system. You'll need to read around it a bit and there's a special yum scl related command to enter beforehand. Then it installs a new version in the /opt directory tree - without affecting your existing version. I have had to copy across various .so modules into the new /php/modules directory.

Then multiple version appear in the plesk panel.
There's also the Atomic related Panda php install - which is based on similar principles.
 
I found my problem, I had the register_globals = YES in Plesk PHP parameters, which was causing the issue as it's not used valid directive for PHP5.4.

A fast procedure to figure this out and resolve the issue:
1) see in log file "/var/log/httpd/error_log" the following "PHP Fatal error: Directive 'register_globals' is no longer available in PHP in Unknown on line 0" after trying to execute the php page on the host using fastcgi
2) go to PLESK admin panel (11.5 for myself), click DOMAINS, then choose the domain using fastcgi.
3) click on General, then Personalize
4) click on PHP Parameters tab
5) go to line "register_globals", and MAKE SURE it's set to "DEFAULT" (which means the directive won't get written in the php.ini for a host using PHP 5.4)
Voilà!
 
Back
Top