PHP Multiple versions

Discussion in 'Installation/Configuration' started by kurdak, Nov 26, 2012.

  1. kurdak

    kurdak New Member

    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.
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. kurdak

    kurdak New Member

    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?
     
    Last edited: Nov 29, 2012
  4. kurdak

    kurdak New Member

    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 ! :)
     
    Last edited: Nov 28, 2012
  5. falko

    falko Super Moderator Howtoforge Staff

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

    falko Super Moderator Howtoforge Staff

  7. kurdak

    kurdak New Member

    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
     
    Last edited: Nov 29, 2012
  8. kurdak

    kurdak New Member

    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.
     
    Last edited: Nov 29, 2012
  9. kurdak

    kurdak New Member

    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
     
    Last edited: Nov 29, 2012
  10. falko

    falko Super Moderator Howtoforge Staff

    For PHP 5.2, you need to add

    --enable-fastcgi

    Configure options have changed between PHP 5.2 and 5.3.
     
  11. jboud

    jboud Member

    Hello, I'm trying for days now to collect bits and bytes from all successful stories and tutorials and I'm stuck.

    I have Debian squeeze installed with perfect server setup and ispconfig 3 and I'm trying to install additional vesrion of php 5.2.17(or any 5.2). This thread comes closer to my attempts but I also used the guide you have linked earlier Falko. I'm stuck on ./configure with the error:

    configure: error: libjpeg.(a|so) not found.

    I tried some generic hints from searching google but I've had no success.
    I'm asking for any kind of help regarding this error, or If anyone has any success story with my setup.

    Thank you!
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    The libjpeg library or dev package from debian seems to be missing.
     
  13. jboud

    jboud Member

    Hey Thanks for the reply.

    They do look like they're missing but have a look:

    apt-get install libjpeg-dev
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    Note, selecting 'libjpeg62-dev' instead of 'libjpeg-dev'
    libjpeg62-dev is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    apt-get install libjpeg62
    Reading package lists... Done
    Building dependency tree
    Reading state information... Done
    libjpeg62 is already the newest version.
    0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

    root@somwhere:/usr/lib# ls -l libjp*
    -rw-r--r-- 1 root root 221942 Jun 30 2010 libjpeg.a
    -rw-r--r-- 1 root root 918 Jun 30 2010 libjpeg.la
    lrwxrwxrwx 1 root root 17 May 29 02:07 libjpeg.so -> libjpeg.so.62.0.0
    lrwxrwxrwx 1 root root 17 May 17 02:55 libjpeg.so.62 -> libjpeg.so.62.0.0
    -rw-r--r-- 1 root root 145048 Jun 30 2010 libjpeg.so.62.0.0

    Also have symlinks, I read something about that. I also make symlinks on /opt, read about such solution on another place.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

  15. jboud

    jboud Member

    Thank you for quick response once again.

    I don't care that much on why I can't install it or fix it. Could you point me on some direction for that phpfarm? A successful tutorial for installing it on debian squeeze and how to use it with ispconfig 3?

    I know there are a bunch out there, but I trust you more in pointing me to the best :D

    Thank you once again.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    The link that I posted above are the instructions that I used to install and use it. There is nothing special regarding ispconfig except that you just have to add the path to the newly compiled php binary in ispconfig as additional php version.
     
  17. jboud

    jboud Member

    okey, doing it already. Compile take long enough for me to write here. I'll post my feedback and hopefully my success story.
     
  18. jboud

    jboud Member

    Ok, I did it. The first time it crashed my server. Maybe because it's a live installation and I did it during prime time :D Anyway, the second time it compiled my php 5.2.17 version successfully. Now, the million dollar quetion. What are the paths I should include in ispconfig? :D
     
  19. jboud

    jboud Member

    I tried:
    /opt/phpfarm/inst/php-5.2.17/bin and
    /opt/phpfarm/inst/php-5.2.17/lib

    but I'm getting internal server error on the website I activated it.
     
  20. jboud

    jboud Member

    Hello, I still haven't solve this. My phpfarm compiles fine whatever version of php I ask it for, but my website is always giving me Internal Server Error when I activate it on ISPConfig 3.

    Do my paths look ok like that or I need to look somewhere else in my system to solve this issue?

    Thanks.
     

Share This Page