Php 5.2

Discussion in 'ISPConfig 3 Priority Support' started by Numerizen, Sep 13, 2014.

  1. Numerizen

    Numerizen Member

    Hi all,

    I need to make php 5.2 to work on my install.

    I followed the steps mixing different tutorials and have a working version : I can call it via command line and it works OK.

    Unfortunately, as soon as I configure ISPC3 to use it, I got only 500 internal server errors. Even trying to display a simple phpinfo() in a file leads to the error.

    Wheezy 64 bits up to date.
    Compiled with the following flags :

    ./configure \
    --prefix=/opt/php-5.2.17 \
    --datadir=/opt/php-5.2.17 \
    --mandir=/usr/share/man \
    --bindir=/usr/bin/php52 \
    --with-libdir=lib64 \
    --includedir=/usr/include \
    --sysconfdir=/etc/php52/apache2 \
    --with-config-file-path=/etc/php52/cli \
    --with-config-file-scan-dir=/etc/php52/conf.d \
    --localstatedir=/var \
    --disable-debug \
    --with-regex=php \
    --disable-rpath \
    --disable-static \
    --disable-posix \
    --with-pic \
    --with-layout=GNU \
    --with-pear=/usr/share/php \
    --enable-calendar \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-sysvmsg \
    --enable-bcmath \
    --with-bz2 \
    --enable-ctype \
    --without-gdbm \
    --with-iconv \
    --enable-exif \
    --enable-ftp \
    --enable-cli \
    --with-gettext \
    --enable-mbstring \
    --with-pcre-regex=/usr \
    --enable-shmop \
    --enable-sockets \
    --enable-wddx \
    --with-libxml-dir=/usr \
    --with-zlib \
    --with-kerberos=/usr \
    --with-openssl=/usr \
    --enable-soap \
    --enable-zip \
    --with-mhash \
    --with-exec-dir=/usr/lib/php5/libexec \
    --without-mm \
    --with-curl=shared,/usr \
    --with-zlib-dir=/usr \
    --with-gd=shared,/usr \
    --enable-gd-native-ttf \
    --with-gmp=shared,/usr \
    --with-jpeg-dir=shared,/usr \
    --with-xpm-dir=shared,/usr/X11R6 \
    --with-png-dir=shared,/usr \
    --with-freetype-dir=shared,/usr \
    --with-ttf=shared,/usr \
    --with-t1lib=shared,/usr \
    --with-ldap=shared,/usr \
    --with-mysql=shared,/usr \
    --with-mysqli=shared,/usr/bin/mysql_config \
    --with-pgsql=shared,/usr \
    --with-pspell=shared,/usr \
    --with-unixODBC=shared,/usr \
    --with-xsl=shared,/usr \
    --with-snmp=shared,/usr \
    --with-sqlite=shared,/usr \
    --with-tidy=shared,/usr \
    --with-xmlrpc=shared \
    --enable-pdo=shared \
    --without-pdo-dblib \
    --with-pdo-mysql=shared,/usr \
    --with-pdo-pgsql=shared,/usr \
    --with-pdo-odbc=shared,unixODBC,/usr \
    --with-pdo-dblib=shared,/usr \
    --enable-force-cgi-redirect --enable-fastcgi \
    --with-libdir=/lib/x86_64-linux-gnu \
    --with-pdo-sqlite=shared \
    --with-sqlite=shared \
    --enable-ipv6 \
    --with-mcrypt \
    --with-imap-ssl

    I'm sure about my parameters in ISPC3 :

    /opt/php-5.2.17/bin/php-cgi
    /opt/php-5.2.17/lib

    The PHP version appears OK in the list for every website.

    The only thing that appears in acces.log is :

    X-Powered-By: PHP/5.2.17
    Content-type: text/html

    ... and nothing else.

    I searched the forum about this problem, which seems pretty common, but no solution worked for me yet.
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please try this configure statement:

    ./configure \
    --prefix=/opt/phpfcgi-5.2.17 \
    --with-pdo-pgsql \
    --with-zlib-dir \
    --with-freetype-dir \
    --enable-mbstring \
    --with-libxml-dir=/usr \
    --enable-soap \
    --enable-calendar \
    --with-curl \
    --with-mcrypt \
    --with-zlib \
    --with-gd \
    --with-pgsql \
    --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-dir=/usr \
    --with-png-dir=/usr \
    --enable-gd-native-ttf \
    --with-openssl \
    --with-fpm-user=www-data \
    --with-fpm-group=www-data \
    --with-libdir=/lib/x86_64-linux-gnu \
    --enable-ftp \
    --with-imap \
    --with-imap-ssl \
    --with-kerberos \
    --with-gettext \
    --enable-cgi
     
  3. Numerizen

    Numerizen Member

    Last edited: Sep 13, 2014
  4. Numerizen

    Numerizen Member

  5. Numerizen

    Numerizen Member

    A more complete log :

    [Sat Sep 13 17:56:17 2014] [error] [client 66.249.78.15] File does not exist: /var/www/fr
    X-Powered-By: PHP/5.2.17
    Content-type: text/html

    X-Powered-By: PHP/5.2.17
    Content-type: text/html

    [Sat Sep 13 17:57:02 2014] [notice] Graceful restart requested, doing restart
    [Sat Sep 13 17:57:02 2014] [warn] NameVirtualHost *:443 has no VirtualHosts
    [Sat Sep 13 17:57:02 2014] [notice] Digest: generating secret for digest authentication ...
    [Sat Sep 13 17:57:02 2014] [notice] Digest: done
    [Sat Sep 13 17:57:02 2014] [notice] FastCGI: process manager initialized (pid 2064)
    [Sat Sep 13 17:57:02 2014] [error] python_init: Python version mismatch, expected '2.7.2+', found '2.7.3'.
    [Sat Sep 13 17:57:02 2014] [error] python_init: Python executable found '/usr/bin/python'.
    [Sat Sep 13 17:57:02 2014] [error] python_init: Python path being used '/usr/lib/python2.7/:/usr/lib/python2.7/plat-linux2:/usr/lib/python2.7/lib-tk:/usr/lib/python2.7/lib-old:/usr/lib/python2.7/lib-dynload'.
    [Sat Sep 13 17:57:02 2014] [notice] mod_python: Creating 8 session mutexes based on 150 max processes and 0 max threads.
    [Sat Sep 13 17:57:02 2014] [notice] mod_python: using mutex_directory /tmp
    [Sat Sep 13 17:57:02 2014] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
    [Sat Sep 13 17:57:02 2014] [notice] Apache/2.2.22 (Debian) DAV/2 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_fcgid/2.3.6 PHP/5.4.4-14+deb7u14 mod_python/3.3.1 Python/2.7.3 mod_ruby/1.2.6 Ruby/1.8.7(2012-02-08) mod_ssl/2.2.22 OpenSSL/1.0.1e configured -- resuming normal operations
    [Sat Sep 13 17:57:02 2014] [warn] long lost child came home! (pid 1486)
    [Sat Sep 13 17:57:03 2014] [error] [client 180.76.6.43] File does not exist: /var/www/fr
    [Sat Sep 13 17:57:09 2014] [error] [client 66.249.78.15] File does not exist: /var/www/fr
    [Sat Sep 13 17:57:19 2014] [error] [client 66.249.78.22] File does not exist: /var/www/fr
     
  6. Numerizen

    Numerizen Member

    Solved the python mismatch problem but still no luck.

    I keep finding fastcgi threads on google, and it seems every one is using suexec stuff.

    Should I make something about this ?
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Suexec is not related to the compilation of php. And suexec is used by ispconfig by default, just enebale the usxec checkbox in the website settings.
     
  8. Numerizen

    Numerizen Member

    It was already enabled, but I didn't notice before. Still no luck ...
     
  9. Numerizen

    Numerizen Member

    I'm sure it's Apache related, as all command line tests are good.

    For example :

    cat info.php | /var/www/php-fcgi-scripts/web19/.php-fcgi-starter

    ... correctly outputs the phpinfo() page.
     
  10. Numerizen

    Numerizen Member

    Raised the loglevel in Apache. After calling the same test page :

    tail /var/log/apache2/error.log

    [Sun Sep 14 19:14:07 2014] [info] mod_fcgid: server filoeuvre.com:/var/www/php-fcgi-scripts/web19/.php-fcgi-starter(9398) started
    X-Powered-By: PHP/5.2.17
    Content-type: text/html

    [Sun Sep 14 19:14:13 2014] [info] mod_fcgid: process /var/www/php-fcgi-scripts/web19/.php-fcgi-starter(9398) exit(communication error), terminated by calling exit(), return code: 0
     
  11. Numerizen

    Numerizen Member

  12. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Please try this configure statement (used tills one with two added options):

    Code:
    ./configure \
    --prefix=/opt/phpfcgi-5.2.17 \
    --with-pdo-pgsql \
    --with-zlib-dir \
    --with-freetype-dir \
    --enable-mbstring \
    --with-libxml-dir=/usr \
    --enable-soap \
    --enable-calendar \
    --with-curl \
    --with-mcrypt \
    --with-zlib \
    --with-gd \
    --with-pgsql \
    --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-dir=/usr \
    --with-png-dir=/usr \
    --enable-gd-native-ttf \
    --with-openssl \
    --with-fpm-user=www-data \
    --with-fpm-group=www-data \
    --with-libdir=/lib/x86_64-linux-gnu \
    --enable-ftp \
    --with-imap \
    --with-imap-ssl \
    --with-kerberos \
    --with-gettext \
    --enable-cgi \
    --enable-force-cgi-redirect \
    --enable-fastcgi
    
     
  13. Numerizen

    Numerizen Member

    Trying this.

    make clean && make && make install is ok ? It will overwrite the former version ?
     
  14. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Yes, but first make clean, THEN configure, THEN make and make install.
     
  15. Numerizen

    Numerizen Member

    You're the man ! I could display my info page, and make my venerable Drupal 5 sites run without complaining.

    It's --with-config-file-path that did the trick right ?

    May I apply the same flags to the 5.3 FPM version ?
     
  16. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    No, it was the --enable-fastcgi and --enable-force-cgi-redirect
    Those are not suitable for fpm. You have to use --enable-fpm instead.
    The howto you mentioned above should work for fpm.
     
  17. Numerizen

    Numerizen Member

    Well, fact is it didn't, so I suspect it's also a compilation flag problem.
     
  18. Croydon

    Croydon ISPConfig Developer ISPConfig Developer

    Are you sure that you didn't mix fpm and fastcgi?
     
  19. Numerizen

    Numerizen Member

    Don't think so : ran the compilation in another directory, corrected the paths to match latest version.

    Here is the command :

    ./configure \
    --prefix=/opt/php-5.3.29 \
    --with-pdo-pgsql \
    --with-zlib-dir \
    --with-freetype-dir \
    --enable-mbstring \
    --with-libxml-dir=/usr \
    --enable-soap \
    --enable-calendar \
    --with-curl \
    --with-mcrypt \
    --with-zlib \
    --with-gd \
    --with-pgsql \
    --disable-rpath \
    --enable-inline-optimization \
    --with-bz2 \
    --with-zlib \
    --enable-sockets \
    --enable-sysvsem \
    --enable-sysvshm \
    --enable-pcntl \
    --enable-mbregex \
    --enable-exif \
    --enable-bcmath \
    --with-mhash \
    --enable-zip \
    --with-pcre-regex \
    --with-mysql \
    --with-pdo-mysql \
    --with-mysqli \
    --with-jpeg-dir=/usr \
    --with-png-dir=/usr \
    --enable-gd-native-ttf \
    --with-openssl \
    --with-fpm-user=www-data \
    --with-fpm-group=www-data \
    --with-libdir=/lib/x86_64-linux-gnu \
    --enable-ftp \
    --with-imap \
    --with-imap-ssl \
    --with-kerberos \
    --with-gettext \
    --with-xmlrpc \
    --with-xsl \
    --enable-fpm
     
  20. Numerizen

    Numerizen Member

    Anyway this problem can wait. I have another one related to DNS (www not propagating) : should I open a new thread or continue with this one ?
     

Share This Page