Ispconfig does not reload php-fpm using PHP7.0 from DotDeb

Discussion in 'Installation/Configuration' started by lnxgs, Apr 3, 2016.

  1. lnxgs

    lnxgs Member

    Hi,
    I'm ending with installing php7.0 from dotdeb repository because their package are well integrated on Debian Jessie.
    I added the PHP7.0 as "Additional PHP Versions" on Isconfig panel. I achieved to configure everything except the application of changes on website configuration.
    Basically, I modify a website web domain setting, wait a couple of minutes, nothing happens. If I reload or restart php7.0-fpm deamon, the change becomes available.

    Here I post my settings for this additional php version:

    Path to the PHP FastCGI binary /usr/bin/php7.0
    Path to the php.ini directory /etc/php/7.0/cgi

    Path to the PHP-FPM init script /etc/init.d
    Path to the php.ini directory /etc/php/7.0/fpm
    Path to the PHP-FPM pool directory /etc/php/7.0/fpm/pool.d

    Do you have any suggestions in order to avoid reloading php7-fpm manually?
    Regards,
    L.
     
    Last edited: Apr 3, 2016
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    ISPConfig 3.0.5.x can not run on PHP 7 but it supports PHP 7 when it is installed as additional version as described here https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/. Check with to ensure that dotdeb did not upgraded the system php:

    php --version

    the result has to be PHP 5.6. If it shows PHP 7, then you upgraded the system php which will make ispconfig to fail. ISPConfig < 3.1 requires PHP 5.3 - 5.6. ISPConfig >= 3.1 supports php 7 as system and additional PHP.

    There are also some threads here in the forum about issues that arise when you mix systemd and init script starts of php 7.
     
  3. lnxgs

    lnxgs Member

    Thank you Till.
    At the end, I succeded in installing PHP7 on Debian Jessie along with PHP5 using dotdeb packages. The tip is avoiding adding the libapache for php7 and leaving the old libapache of php5 and use php-fpm7 for PHP7 website.

    I followed the ispconfig guide, but for every release of php7 I needed to rebuild everything and de-install the previous version, this is a drawback. The main pro is that I can add --enable-file-cache, because I discover that php7 from dotdeb are not compiled with such tag... :(

    Regards,
    L.
     
    Last edited: Apr 9, 2016
  4. baasha

    baasha New Member

    Hi Lnxgs,
    trying to solve the same problem you had, but still no luck ... Also trying to use php-fpm 5.6 and php-fpm 7.0 concurrently, using debian's jessie official PHP5.6 package and dotdeb's PHP7 (PHP 7.0.8-1~dotdeb+8.1) package.
    I dont understand, if you finally got it working or had to resign and compile it on your own from sources?

    Thanks,
    Baasha
     
  5. lnxgs

    lnxgs Member

    Hi,
    It works but it does not work fine on ISPConfig 3.0.5.x. I upgraded to 3.1 betas...
    What is the error you get?

    Regards,
    L.
     
  6. baasha

    baasha New Member

    Hi,
    I am also on 3.1 beta, it says ISPConfig 3.1b1.
    I dont get any error, or at least I dont know where to look for it.
    Everythings seems ok, both php-fpms are runnung in system, but when I assign PHP7 to some vhost, system ignores it and doesnot reconfigure it, so it still runs PHP5.6

    In ISPConfig the PHP7 is configured the same as PHP5.6, I just used correct paths (php/7.0 instead of php5 and so on ...)

    Here is some running processess list:
    # ps axf | grep php
    639 ? Ss 0:01 php-fpm: master process (/etc/php5/fpm/php-fpm.conf)
    641 ? S 0:00 \_ php-fpm: pool web3
    642 ? S 0:00 \_ php-fpm: pool web3
    643 ? S 0:01 \_ php-fpm: pool web4
    644 ? S 0:01 \_ php-fpm: pool web4
    645 ? S 0:00 \_ php-fpm: pool web5
    646 ? S 0:00 \_ php-fpm: pool web5
    647 ? S 0:00 \_ php-fpm: pool web6
    648 ? S 0:00 \_ php-fpm: pool web6
    649 ? S 0:00 \_ php-fpm: pool www
    650 ? S 0:00 \_ php-fpm: pool www
    943 ? S 0:01 \_ php-fpm: pool web4
    946 ? S 0:01 \_ php-fpm: pool web4
    953 ? S 0:01 \_ php-fpm: pool web4
    1019 ? Ss 0:00 | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    1020 ? S 0:01 | | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    1023 ? Ss 0:00 | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    1024 ? S 0:01 | | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    23306 ? Ss 0:00 | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    23307 ? S 0:00 | \_ /usr/bin/php-cgi -d disable_classes= -d disable_functions= -d magic_quotes_gpc=off -d open_basedir= -d session.save_path=/usr/local/ispconfig/interface/temp
    18609 ? Ss 0:00 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
    18610 ? S 0:00 \_ php-fpm: pool www
    18611 ? S 0:00 \_ php-fpm: pool www

    Any suggestion ?

    Thanks,
    B.
     
  7. baasha

    baasha New Member

    Oh and I forgot, this is a part of my vhost file:
    ...
    Action php5-fcgi /php5-fcgi virtual
    Alias /php5-fcgi /data/clients/client1/web4/cgi-bin/php5-fcgi-*-443-[MYDOMAIN]
    FastCgiExternalServer /data/clients/client1/web4/cgi-bin/php5-fcgi-*-443-[MYDOMAIN] -idle-timeout 300 -socket /var/lib/php5-fpm/web4.sock -pass-header Authorization
    ...

    which now correctly runs perfect on PHP5, but I wanted PHP7 ... and this part is still saying PHP5

    B.
     
  8. baasha

    baasha New Member

    ! SOLVED !

    If anyone else has the same problem, the way to solve it was manually run
    /usr/local/ispconfig/server/server.sh

    In my case, it dumps this:
    # /usr/local/ispconfig/server/server.sh
    14.07.2016-23:02 - WARNING - There is already a lockfile set, but no process running with this pid (59
    PHP Fatal error: Uncaught Error: Call to undefined function mb_detect_encoding() in /usr/local/ispcon
    Stack trace:
    #0 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(162): db->escape('There is alread...')
    #1 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(226): db->_build_query_string('INSERT INTO
    #2 /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php(265): db->_query('INSERT INTO sys...', 1,
    #3 /usr/local/ispconfig/server/lib/app.inc.php(165): db->query('INSERT INTO sys...', 1, 1, 'There is a
    #4 /usr/local/ispconfig/server/server.php(139): app->log('There is alread...', 1)
    #5 {main}
    thrown in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 447

    Then it was easy to find out that I need to install php7.0-mbstring package too.
    After
    apt-get install php7.0-mbstring
    it runs without error, regenerates my vhost file correctly and voila, it runs on PHP7.

    So if you run
    php --version
    and it says PHP7.x, you may not have installed all packages that ISPConfig needs.

    Baasha.
     

Share This Page