php-fpm, apache, Deb. Jessie

Discussion in 'ISPConfig 3 Priority Support' started by blackfox123, Jan 21, 2016.

  1. blackfox123

    blackfox123 Member

    I've upgraded, and managed to install php 7.0.2 on my machine, however I'm having problems with both the newly built php 7.0.2 and my old 5.6 php-fpm.

    Apache just doesnt want to parse the php scripts on the server.. i don't see any error or any debug..
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. blackfox123

    blackfox123 Member

    Yes, although i didn't add it to systemctl yet as i have a another beast of a problem with that Failed to get D-Bus connection: Unknown error -1.. but i assume its nothing to do with this?

    Any ideas what else is going on?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    This might be related. If a system has systemd installed, then ispconfig will use systemd to reload and restart services. So if systemd is broken like in your case, then ispconfig cant apply config file changes as a systemd reload call will do nothing.

    Debian 8 supports systemd as well as the classic sysvinit scripts (that Debian 7 used). I guess in your case the issue is related to a mix of both caused by the update.

    Maybe you find some hlep (to switch to one or the other) here: https://wiki.debian.org/systemd
     
  5. blackfox123

    blackfox123 Member

    Aha, that shines a little light on the problem then.
    My deb 8. doesnt seem to support much right now. :(
     
  6. blackfox123

    blackfox123 Member

    systemd isn't installed though, and the php fgci seems to work OK.

    update: systemd is now installed, and fully functional.. phpfpm still doesnt work.
     
    Last edited: Jan 21, 2016
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    any errors in syslog or php-fpmlog when you restart the php fpm service
     
  8. blackfox123

    blackfox123 Member

    syslog says :

    Code:
    Jan 21 18:23:04 celeste php-5.6.0-fpm[6879]: Reload service php-fpm  done
    Jan 21 18:23:05 celeste apache2[6884]: Stopping web server: apache2.
    Jan 21 18:23:06 celeste apache2[6915]: Starting web server: apache2AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/apache2/sites-enabled/000-ispconfig.conf:62
    Jan 21 18:23:07 celeste apache2[6915]: .
    fpmlog says:
    Code:
    [21-Jan-2016 18:23:04] NOTICE: reloading: execvp("/opt/php-5.6.0/sbin/php-fpm", {"/opt/php-5.6.0/sbin/php-fpm", "--fpm-config", "/opt/php-5.6.0/etc/php-fpm.conf"})
    [21-Jan-2016 18:23:04] NOTICE: using inherited socket fd=9, "127.0.0.1:8998"
    [21-Jan-2016 18:23:04] NOTICE: using inherited socket fd=9, "127.0.0.1:8998"
    [21-Jan-2016 18:23:04] NOTICE: fpm is running, pid 6887
    [21-Jan-2016 18:23:04] NOTICE: ready to handle connections
    i know that's 5.6.0 but that also goes for 7.0.2

    Code:
    tail /opt/php-7.0.2/var/log/php-fpm.log
    [21-Jan-2016 17:45:01] NOTICE: using inherited socket fd=8, "127.0.0.1:8999"
    [21-Jan-2016 17:45:01] NOTICE: using inherited socket fd=8, "127.0.0.1:8999"
    [21-Jan-2016 17:45:01] NOTICE: fpm is running, pid 24800
    [21-Jan-2016 17:45:01] NOTICE: ready to handle connections
     
  9. till

    till Super Moderator Staff Member ISPConfig Developer

    Looks fine for me. Please check that mod_fastcgi (not to mix up with mod_fcgi, which is required as well) is installed and enabled in apache.
     
  10. blackfox123

    blackfox123 Member

    Hey Till.. Yes i just noticed this.. I can now see i have PHP-FPM working on php5.6.0 however when changing to php7.0 php doesnt seem to want to parse..
     
  11. till

    till Super Moderator Staff Member ISPConfig Developer

    Try to restart php-fpm of the php7 instance manually.
     
    blackfox123 likes this.
  12. blackfox123

    blackfox123 Member

    Solved it.. it parses..

    Problem i'm facing now is
    Code:
    [Fri Jan 22 10:26:24.866168 2016] [fastcgi:error] [pid 11118] (2)No such file or directory: [client IP:64239] FastCGI: failed to connect to server "/var/www/clients/client9/web51/cgi-bin/php5-fcgi-*-80-site.com": connect() failed
    [Fri Jan 22 10:26:24.866214 2016] [fastcgi:error] [pid 11118] [client IP:64239] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client9/web51/cgi-bin/php5-fcgi-*-80-site.com"
     
  13. till

    till Super Moderator Staff Member ISPConfig Developer

    Did you restart php-fpm or the server? the error means that php-fpm is not configured for this site yet or in other words, the fpm instance does not listen on the socket or port yet.
     
  14. blackfox123

    blackfox123 Member

    I restarted the service.. php-fpm. I can confirm it's running.

    php-fpm 7.0 is set to run with TCP following the guide at https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/
    Its seems FastCGI runs, however FPM doesn't.

    What do you mean not configured for this site? Isn't it just a case of changing the php module in the respective site, which in turn will update the server and tell it what to use? Or do i need to re-parse all the sites again with re-sync?

    I've also followed the comments on that guide, and un-checked Use Socket For PHP-FPM as this is a TCP connection correct?

    Code:
    root@celeste:~# service php-7.0.2-fpm status
    ● php-7.0.2-fpm.service - The PHP 7 FastCGI Process Manager
       Loaded: loaded (/lib/systemd/system/php-7.0.2-fpm.service; enabled)
       Active: active (running) since Fri 2016-01-22 10:46:43 CET; 4h 38min ago
      Process: 14288 ExecReload=/bin/kill -USR2 $MAINPID (code=exited, status=0/SUCCESS)
    Main PID: 13855 (php-fpm)
       CGroup: /system.slice/php-7.0.2-fpm.service
               ├─13855 php-fpm: master process (/opt/php-7.0.2/etc/php-fpm.conf)
               ├─14304 php-fpm: pool www
               └─14305 php-fpm: pool www
     
    Last edited: Jan 22, 2016
  15. till

    till Super Moderator Staff Member ISPConfig Developer

    I'am not talking about a resync. Change the mode to php-fpm and choose php 7. Then wait a minute and then restart the php-fpm daemon for php 7, Thats a test to ensure that there are no systemd errors. A, ensure that you completely followed the https://www.howtoforge.com/tutorial/how-to-install-php-7-on-debian/ incl. creation of the systemd unit file as config file changes will not be accepted by php-fpm if you created a init script only. see my explanations about your systemd error.
     
  16. blackfox123

    blackfox123 Member

    sysmted is installed now, it was an annoying problem with a OVH kernel that made me think something was wrong.

    I have double and triple checked the guide you mentioned, and gone over how i've installed it. I've created a new blank test site, and still i get a 500 error.

    I have restarted php-fpm 7.0 after the control panel has finished updating.

    My errors are still
    Code:
    [Fri Jan 22 15:35:02.557466 2016] [fastcgi:error] [pid 24061] (2)No such file or directory: [client 82.103.134.48:59717] FastCGI: failed to connect to server "/var/www/clients/client0/web93/cgi-bin/php5-fcgi-*-80-qe1.dk": connect() failed
    [Fri Jan 22 15:35:02.557508 2016] [fastcgi:error] [pid 24061] [client 82.103.134.48:59717] FastCGI: incomplete headers (0 bytes) received from server "/var/www/clients/client0/web93/cgi-bin/php5-fcgi-*-80-qe1.dk"
     
  17. till

    till Super Moderator Staff Member ISPConfig Developer

    Please post the output of:

    apache2ctl -M | grep fastcgi
     
  18. blackfox123

    blackfox123 Member

    Code:
    root@celeste:/var/www/qe1.dk# apache2ctl -M | grep fastcgi
    fastcgi_module (shared)
     
  19. till

    till Super Moderator Staff Member ISPConfig Developer

    Das ist ok. Dann weiß ich auch nicht was bei Dir noch schief gelaufen sein kann. Server hast Du ja sicher schon mal rebootet? Nicht dass der php-fpm hängt und die config nicht läd.
     
  20. blackfox123

    blackfox123 Member

    I've safely rebooted yes... I could try and use sockets instead of TCP i guess..
     

Share This Page