• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Problem installing PHP5.6.3

Edwin_Dijk

New Pleskian
Hello,

I have been trying to install PHP5.6.3 next to PHP5.3.3 on Plesk 12 (12.0.18 Update #28). I have followed the steps in the tutorial provided bij Parallels: http://kb.odin.com/en/118378

Initially, I had the same configurations as in the tutorial. At the end, I changed the id, the name and the location of the php.ini. (It already gave an error with the original php.ini though, and the name and id shouldn't have anything to do with it.)

At the end I had this list of php_handlers:

Code:
[root@server php563-cgi]# /usr/local/psa/bin/php_handler --list
  id:  display name:  full version:  version:  type:  cgi-bin:  php-cli:  php.ini:  custom:
  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
  fastcgi2  5.6.3  5.6.3  5.6  fastcgi  /usr/local/php563-cgi/bin/php-cgi  /etc/php.ini  true
  module  5.3.3  5.3.3  5.3  module  /usr/bin/php-cgi  /etc/php.ini  false

Inside /usr/local/php563-cgi/bin/ I have:
Code:
[root@server bin]# ls -l
total 71716
-rwxr-xr-x. 1 root root  863 Dec 17 17:18 pear
-rwxr-xr-x. 1 root root  884 Dec 17 17:18 peardev
-rwxr-xr-x. 1 root root  800 Dec 17 17:18 pecl
lrwxrwxrwx. 1 root root  35 Dec 17 17:18 phar -> /usr/local/php563-cgi/bin/phar.phar
-rwxr-xr-x. 1 root root  14834 Dec 17 17:18 phar.phar
-rwxr-xr-x. 1 root root 36739677 Dec 17 17:18 php
-rwxr-xr-x. 1 root root 36652068 Dec 17 17:18 php-cgi
-rwxr-xr-x. 1 root root  3874 Dec 17 17:18 php-config
-rwxr-xr-x. 1 root root  4555 Dec 17 17:18 phpize

PHP seems to work (compiled for fastcgi):
Code:
[root@server bin]# ./php-cgi -v
PHP 5.6.3 (cgi-fcgi) (built: Dec 17 2014 17:10:08)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2014 Zend Technologies


Now I end up with the problem, that whenever I change the PHP version for a domain to the new PHP version, it gives me an Internal Server Error (500).

I don't have any prior experience with Plesk, so I don't know enough about the inner workings just yet. Could anyone please help me solve this?

Thanks in advance!
 
Thanks. In the domain log, I got:

Code:
[Thu Dec 18 09:05:02 2014] [warn] [client 82.172.144.165] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Thu Dec 18 09:05:02 2014] [error] [client 82.172.144.165] Premature end of script headers: index.php

Common fixes found on Google were:
- Recompiling PHP (I double checked on fastcgi)
- Change permissions on the compiled PHP to 755
- Freeing memory (free -m)
- Reconfiguring the virtual host
- Checked /etc/passwd permissions
- Emptied the php.ini attached to it
- Adding CGI_PHP_BIN /usr/bin/php-cgi to /etc/psa/psa.conf

I tried all of them with no luck... There are no traces of the error in the Apache error_log or in the suexec_log.

If I create a test php file and run it with ./php of ./php-cgi it doesn't produce any errors, so the PHP executables work. I'm kinda stuck right now...
 
If you mean this KB article http://kb.odin.com/en/120785 and this didn't help, I can only recommend to create a request to support team to do in-depth investigation to find the reason and to fix it. Please create a ticket to support at https://odin.com/hcap/support/request/ You may have free support, please check what kind of Plesk license you use for available support options at http://kb.odin.com/en/121580 .
If there’s no free support in your case, you can order Plesk per-incident support at http://odin.com/hcap/support/buy-support/. Support team will contact you as soon as purchase is processed, and they will do the best to resolve it. If it is found that your problem was caused by product bug w/o available solution or workaround from Parallels, then your purchase will be re-funded.
 
It's strange, since PHP5.3 runs with FastCGI out of the box. Running another version of PHP with FastCGI somehow doesn't work, so maybe I should try with PHP5.5 or so... If I manage to make it work, I'll update this thread. :)
 
Back
Top