I'm trying to add multiple PHP version (current version installed: 5.5.13), using the official documentation. I always get 500 Internal Server Error after switching to the new version, with the following error_log content:
Here you can view phpinfo() obtained running php54-cgi index.php from the command line. Same script doesn't work as FastCGI.
I'm trying to add PHP 5.4.29. Here is how I compiled it:
Result:
Switching back to PHP 5.5.13 and the script works fine (a simple phpinfo() output).
How can I try to understand/debug what's wrong with the installation?
Code:
[Sat Jun 07 00:49:35 2014] [warn] [client XXX.XXX.XXX.XXX] (104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
[Sat Jun 07 00:49:35 2014] [error] [client XXX.XXX.XXX.XXX] Premature end of script headers: index.php
Here you can view phpinfo() obtained running php54-cgi index.php from the command line. Same script doesn't work as FastCGI.
I'm trying to add PHP 5.4.29. Here is how I compiled it:
Code:
./configure \
--prefix=/usr/local/php54 \
--with-bz2 \
--with-config-file-path=/usr/local/php54/etc \
--with-config-file-scan-dir=/usr/local/php54/etc/php.d \
--with-curl \
--with-gd \
--with-gettext \
--with-iconv \
--with-layout=PHP \
--with-libxml-dir=/usr/local/php54 \
--with-mhash \
--with-mysql=mysqlnd \
--with-mysqli=mysqlnd \
--with-openssl \
--with-pdo-mysql=mysqlnd \
--with-readline \
--with-xsl \
--with-zlib \
--enable-calendar \
--enable-cgi \
--enable-exif \
--enable-ftp \
--enable-intl \
--enable-mbstring \
--enable-pcntl \
--enable-shmop \
--enable-sockets \
--enable-sockets \
--enable-sysvmsg \
--enable-sysvsem \
--enable-sysvshm \
--enable-wddx \
--enable-zip
Code:
make && make install
Code:
cp php.ini-development /usr/local/php54/et/php.ini
/usr/local/psa/bin/php_handler --add -displayname 5.4.29 -path /usr/local/php54/bin/php-cgi -phpini /usr/local/php54/etc/php.ini -type fastcgi -id php54
Result:
Code:
Installing PHP CLI binary: /usr/local/php54/bin/
Installing PHP CLI man page: /usr/local/php54/php/man/man1/
Installing PHP CGI binary: /usr/local/php54/bin/
Installing PHP CGI man page: /usr/local/php54/php/man/man1/
Installing build environment: /usr/local/php54/lib/php/build/
Installing header files: /usr/local/php54/include/php/
Installing helper programs: /usr/local/php54/bin/
program: phpize
program: php-config
Installing man pages: /usr/local/php54/php/man/man1/
page: phpize.1
page: php-config.1
Installing PEAR environment: /usr/local/php54/lib/php/
[PEAR] Archive_Tar - already installed: 1.3.11
[PEAR] Console_Getopt - already installed: 1.3.1
[PEAR] PEAR - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/php54/etc/pear.conf
You may want to add: /usr/local/php54/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util - already installed: 1.2.1
/usr/local/src/php-5.4.29/build/shtool install -c ext/phar/phar.phar /usr/local/php54/bin
ln -s -f /usr/local/php54/bin/phar.phar /usr/local/php54/bin/phar
Installing PDO headers: /usr/local/php54/include/php/ext/pdo/
Switching back to PHP 5.5.13 and the script works fine (a simple phpinfo() output).
How can I try to understand/debug what's wrong with the installation?
Last edited: