HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   PHP Multiple versions (http://www.howtoforge.com/forums/showthread.php?t=59701)

kurdak 26th November 2012 13:33

PHP Multiple versions
 
Hello !
I installed ISPConfig 3.0.5.
Please help me how to install Debian 6 php version 5.2 and how to configure ISPConfig.

Regards.

falko 27th November 2012 12:46

Take a look at chapter 14.3 on http://www.howtoforge.com/perfect-se...ispconfig-3-p4 . This should work for PHP 5.2 as well. Please note that you can only use FastCGI with PHP 5.2, not PHP-FPM because PHP-FPM has a different syntax in 5.2 compared to 5.3 and 5.4.

kurdak 27th November 2012 12:58

Okay, so I made so far these commands:
Code:

mkdir /opt/php-5.2.17
mkdir /usr/local/src/php5-build
cd /usr/local/src/php5-build
wget http://de.php.net/get/php-5.2.17.tar.bz2/from/this/mirror -O php-5.2.17.tar.bz2
tar jxf php-5.2.17.tar.bz2
cd php-5.2.17/

Now I need to configure PHP 5.2.17:
Code:

./configure \
--prefix=/opt/php-5.2.17 \
--enable-fastcgi \
--disable-rpath \    - If this setting is turned on I get the same extras as the main PHP?
--with-mysql

I made:
Code:

make
make install
cp /usr/local/src/php5-build/php-5.2.17/php.ini-recommended /opt/php-5.2.17/lib/php.ini

In ISPConfig setting Additional PHP Versions:
Additional PHP Versions: /opt/php-5.2.17/bin/php
Path to the php.ini directory: /opt/php-5.2.17/lib

And now if I go to the my sub.domian.com I get: ERROR 500 - Internal Server Error
Now what I have to do?

kurdak 28th November 2012 14:31

I get the following errors:
error.log:
Code:

(104)Connection reset by peer: mod_fcgid: error reading data from FastCGI server
Premature end of script headers: index.php

suexec.log:
Code:

[2012-11-28 13:26:17]: uid: (5008/web12) gid: (5006/client0) cmd: .php-fcgi-starter
When I type this command in shell:
/opt/php-5.2.17/bin/php /var/www/sub.domain.com/web/index.php
Shows me correctly script written in php.
Please help me ! :)

falko 28th November 2012 18:06

I'm getting the same error. I'm currently investigating this...

falko 28th November 2012 19:36

I've found the problem and have updated the instructions on http://www.howtoforge.com/perfect-se...ispconfig-3-p4

kurdak 28th November 2012 22:47

In Debian Squeeze to configure on clear install:
Code:

./configure \
--prefix=/opt/php-5.2.17 \
--with-mysql --enable-cgi \
--with-zlib-dir \
--with-freetype-dir \
--enable-mbstring \
--with-libxml-dir=/usr \
--enable-soap \
--enable-calendar \
--with-zlib \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--enable-zip \
--with-pcre-regex \
--with-pdo-mysql \
--with-mysqli

Of course, we also need:

apt-get build-dep php5
apt-get install libfcgi-dev libfcgi0ldbl libjpeg62-dbg libmcrypt-dev libssl-dev

kurdak 29th November 2012 11:29

Okay, so once again I installed Debian 6 and ISPConfig third
I did everything as we wrote above.
Dlaej the same error 500: (

Respect for help.

kurdak 29th November 2012 13:09

Code:

./configure \
--prefix=/opt/php-5.2.17 \
--with-libdir=/usr/lib
--with-freetype \
--enable-cgi \
--enable-mbstring \
--with-libxml \
--enable-soap \
--enable-calendar \
--with-curl \
--with-mcrypt \
--with-zlib \
--with-gd \
--disable-rpath \
--enable-inline-optimization \
--with-bz2 \
--with-zlib \
--enable-sockets \
--enable-sysvsem \
--enable-sysvshm \
--enable-pcntl \
--enable-mbregex \
--with-mhash \
--enable-zip \
--with-pcre-regex \
--with-mysql \
--with-pdo-mysql \
--with-mysqli \
--with-jpeg \
--with-png \
--enable-gd-native-ttf \
--with-openssl

But still:
Code:

ERROR 500

falko 30th November 2012 16:59

For PHP 5.2, you need to add

--enable-fastcgi

Configure options have changed between PHP 5.2 and 5.3.


All times are GMT +2. The time now is 09:18.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.