[SOLVED] Update php version in ISPConfig after upgrade to Debian 9

Discussion in 'General' started by gscaglia, Aug 30, 2017.

  1. gscaglia

    gscaglia Member HowtoForge Supporter

    Hi there,
    I've upgrade my servers to DEbian 9 Stretch and the php versions in the servers are now two: 5.6.30 and 7.0.19.
    If I put php -v the result is of course this: PHP 7.0.19-1 (cli) (built: May 11 2017 14:04:47) ( NTS )...
    But on ISPConfig 3 -> Servers Config -> Web -> Php settings there are again the PHP 5 informations and the WordPress sites on the servers work with the old PHP version.
    What's the best way to change the PHP settings on ISPConfig 3 and change the PHP versionon the web sites WordPress present?
    Thanks a lot
     
  2. HSorgYves

    HSorgYves Active Member

    Wordpress works fine with php 7. At least all my sites do... For the change afaik you need to do it manually.
     
  3. gscaglia

    gscaglia Member HowtoForge Supporter

    That's just what I was afraid of!!!:confused:
    The PHP settings for PHP 5, on my ISPConfig panel, are these:
    Apache php.ini path /etc/php5/apache2/php.ini
    CGI php.ini path /etc/php5/cgi/php.ini
    PHP-FPM init script php5-fpm
    PHP-FPM php.ini path /etc/php5/fpm/php.ini
    PHP-FPM pool directory /etc/php5/fpm/pool.d
    PHP-FPM start port 9010
    PHP-FPM socket directory /var/lib/php5-fpm
    PHP open_basedir [website_path]/web:
    [website_path]/private:
    [website_path]/tmp:/var/www/
    [website_domain]/web:/srv/www/
    [website_domain]/web:/usr/share/php5:
    /usr/share/php:/tmp:/usr/share/phpmyadmin:
    /etc/phpmyadmin:/var/lib/phpmyadmin
    Check php.ini every X
    minutes for changes 1 0 = no check​

    If I change the PHP settings for PHP 7 like these I think it's right (Debian 9), please confirm it!
    Apache php.ini path /etc/php/7.0/apache2/php.ini
    CGI php.ini path /etc/php/7.0/cgi/php.ini
    PHP-FPM init script php7.0-fpm
    PHP-FPM php.ini path /etc/php/7.0/fpm/php.ini
    PHP-FPM pool directory /etc/php/7.0/fpm/pool.d
    PHP-FPM start port 9010
    Check php.ini every X
    minutes for changes 1 0 = no check
    But what may I put in these fields?

    PHP-FPM socket directory ???
    PHP open_basedir [website_path]/web:
    [website_path]/private:
    [website_path]/tmp:/var/www/
    [website_domain]/web:/srv/www/
    [website_domain]/web:/usr/share/???:
    /usr/share/php:/tmp:/usr/share/phpmyadmin:
    /etc/phpmyadmin:/var/lib/phpmyadmin​

    I'm sorry but I wouldn't like nothing surprise on the servers in production.
    Thanks a very lot!
     
  4. HSorgYves

    HSorgYves Active Member

    I had trouble with php7 on Debian 9 as well. @till sent me the correct settings a few days ago. Here they are:
    [​IMG]
    So your settings are correct. The missing ones are in the screenshot. Hope this help.
     
    gscaglia likes this.
  5. gscaglia

    gscaglia Member HowtoForge Supporter

    Thanks!!!
    May you copy and paste the "PHP open_basedir" parameters that do not see them all from the image, please?
    Because in the middle there is this "[website_domain]/web:/usr/share/php5:" which worries me very much!:)
     
  6. HSorgYves

    HSorgYves Active Member

    From the VM of the Perfect Setup:
    [website_path]/web:[website_path]/private:[website_path]/tmp:/var/www/[website_domain]/web:/srv/www/[website_domain]/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom
     
    gscaglia likes this.
  7. gscaglia

    gscaglia Member HowtoForge Supporter

    Thank you very much!!!
     

Share This Page