PHP upgrade

Discussion in 'ISPConfig 3 Priority Support' started by jpcyrenne, Dec 14, 2015.

  1. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you try the php-fcgi or php-fpm version? Does the compiled php version work, e.g. did yu test the compiled php binary on the shell with "--version" ?
     
  3. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    I used the php-fcgi version.

    Not exactly sure how to test different versions in shell ? (of course I get the default version of CentOS install here):
    [[email protected] ~]# cd /opt/phpfcgi-5.6.16/
    [[email protected] phpfcgi-5.6.16]# php --version
    PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

    PHP seems to work fine. I added an alias to my .bash_profiles (alias php='/opt/phpfcgi-5.6.16/bin/php-cgi')
    [[email protected] ~]# which php
    alias php='/opt/phpfcgi-5.6.16/bin/php-cgi'
    /opt/phpfcgi-5.6.16/bin/php-cgi
    [[email protected] ~]# php --version
    PHP 5.6.16 (cgi-fcgi) (built: Dec 13 2015 18:37:55)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    -----
    [[email protected] ~]# php -a
    Interactive mode enabled

    <?php echo "hi! HowToForge"; (ie: Ctrl+D used here)
    X-Powered-By: PHP/5.6.16
    Content-type: text/html; charset=UTF-8

    hi! HowToForge
    -----

    Thanks,
    JP
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    When you run PHP --version (no matter in which directory you are) then you test always the system php and not the custom PHP. To test the PHP in the directory where you are, use the command:

    ./php --version

    so you dont have to add a alias in your bash profile then :)

    Is there anything listed in the jobqueue in the ispconfig monitor?
     
  5. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    I'm a bit lost. We know that the 5.6.16 is working.
    When I go into the client's folder and launch 'version' I get this:
    [[email protected] web]# pwd
    /var/www/clients/client1/web1/web
    [[email protected] web]# ./php --version
    -bash: ./php: No such file or directory
    [[email protected] web]# php --version
    PHP 5.3.3 (cli) (built: Jul 9 2015 17:39:00)
    Copyright (c) 1997-2010 The PHP Group
    Zend Engine v2.3.0, Copyright (c) 1998-2010 Zend Technologies

    I confirm your command (with alias removed, log off, log on)
    [[email protected] bin]# pwd
    /opt/phpfcgi-5.6.16/bin
    [[email protected] bin]# ./php --version
    PHP 5.6.16 (cli) (built: Dec 13 2015 18:37:49)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    ------------------
    Jobqueue : No results.
    ISPConfig Log : No results.

    * In ISPConfig I choose fcgi / 5.6.16 and it stays at 5.3.3 (nothing seems to change). Like mentionned, I've done this successfully many times. Just doesn't work here.

    What specific files would this change?

    Thanks,

    JP
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    You hav to be in the php bin directory of the new php version, not the web directory of a site.

    cd /opt/phpfcgi-5.6.16/bin/

    and then check hos the php binary is named with:

    ls

    and then test it either with:

    ./php --version

    or

    ./php-cgi --version
     
  7. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    It's what I did last, no? It's all good.

    [[email protected] bin]# pwd
    /opt/phpfcgi-5.6.16/bin
    [[email protected] bin]# ./php --version
    PHP 5.6.16 (cli) (built: Dec 13 2015 18:37:49)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    [[email protected] ~]# cd /opt/phpfcgi-5.6.16/bin/
    [[email protected] bin]# ls -l
    total 72348
    -rwxr-xr-x 1 root root 862 Dec 13 18:38 pear
    -rwxr-xr-x 1 root root 883 Dec 13 18:38 peardev
    -rwxr-xr-x 1 root root 799 Dec 13 18:38 pecl
    lrwxrwxrwx 1 root root 9 Dec 13 18:38 phar -> phar.phar
    -rwxr-xr-x 1 root root 14838 Dec 13 18:38 phar.phar
    -rwxr-xr-x 1 root root 37063121 Dec 13 18:38 php
    -rwxr-xr-x 1 root root 36977624 Dec 13 18:38 php-cgi
    -rwxr-xr-x 1 root root 3223 Dec 13 18:38 php-config
    -rwxr-xr-x 1 root root 4549 Dec 13 18:38 phpize

    [[email protected] bin]# ./php-cgi --version
    PHP 5.6.16 (cgi-fcgi) (built: Dec 13 2015 18:37:55)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    [[email protected] bin]# ./php --version
    PHP 5.6.16 (cli) (built: Dec 13 2015 18:37:49)
    Copyright (c) 1997-2015 The PHP Group
    Zend Engine v2.6.0, Copyright (c) 1998-2015 Zend Technologies

    ISPConfig doens't redirect to it?

    upload_2015-12-15_16-40-52.png
    JP
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you add and select this new php version in the settings of the website, or did you just alter the path in the additional php version settings? Altering the path of a existing php version has no effect on sites that you created before, it will only be used for new sites.
     
  9. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

    I went in the site settings, chose 5.6.16 (like I usually do)
    upload_2015-12-16_10-50-34.png

    Usually, when I run phpinfo, I get the version change. Not happening here.
    upload_2015-12-16_10-52-3.png

    JP
     
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    Hmm, ok. are there any pending jobs listed in the jobqueue of the system monitor?
     
  11. jpcyrenne

    jpcyrenne Member HowtoForge Supporter

  12. till

    till Super Moderator Staff Member ISPConfig Developer

Share This Page