Using-php5-fpm-with-apache2

Discussion in 'HOWTO-Related Questions' started by pyx69, Feb 13, 2012.

  1. pyx69

    pyx69 New Member

    Hello

    I'm using debian squeeze instead of ubuntu and packages from dotdeb.

    I can't get phpinfo page working. I get a blank page.

    on apache error log I have:

    [Mon Feb 13 18:23:04 2012] [notice] caught SIGTERM, shutting down
    [Mon Feb 13 18:23:04 2012] [alert] (4)Interrupted system call: FastCGI: read() from pipe failed (0)
    [Mon Feb 13 18:23:04 2012] [alert] (4)Interrupted system call: FastCGI: the PM is shutting down, Apache seems to have disappeared - bye

    any suggestions?
    Thanks
    P.
     
  2. falko

    falko Super Moderator Howtoforge Staff

    Can you post your vhost configuration and the output of
    Code:
    netstat -tapn
    ?
     
  3. pyx69

    pyx69 New Member

    Solved

    Hello,

    I solved it... it was a stupid thing , the php.ini for FPM did not have short_open_tag on and my script did'nt have <?php long tag.

    Sorry for the disturb.

    Do you think it is better to add the following directive?

    <Location "/usr/lib/cgi-bin/php5-fcgi">
    Order Deny,Allow
    Deny from All
    Allow from env=REDIRECT_STATUS
    Options ExecCGI FollowSymLinks
    SetHandler fastcgi-script
    </Location>

    Thank you.
    P.
     
  4. pyx69

    pyx69 New Member

    Another problem with PHP scripts without extension

    Hello,

    I can't execute PHP file without extension.

    Putting SetHandler fastcgi-script in .htaccess makes Apache hang until timeout and i get in the log:
    [warn] FastCGI: (dynamic) server "/html/testscript" has failed to remain running for 30 seconds given 3 attempts, its restart interval has been backed off to 600 seconds

    Putting SetHandler php5-fcgi in .htaccess results in error Access denied with 403 error in access log

    I tried to add all of the following (one by one) in .htaccess (now I commented them all)
    <Files testscript>
    #ForceType application/x-httpd-php
    #Action php5-fcgi /php5-fcgi
    #SetHandler fastcgi-script
    #SetHandler php5-fcgi
    </Files>

    My apache config is :

    ScriptAlias /cgi-bin/ "/usr/lib/cgi-bin/"
    AddHandler php5-fcgi .php
    Action php5-fcgi /php5-fcgi
    Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
    FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /tmp/php5-fpm.sock -pass-header Authorization

    <Location "/usr/lib/cgi-bin/php5-fcgi">
    Order Deny,Allow
    Deny from All
    Allow from env=REDIRECT_STATUS
    Options ExecCGI FollowSymLinks
    SetHandler fastcgi-script
    </Location>

    I hope in someone's help.

    Ciao
    P
     
    Last edited: Feb 22, 2012
  5. pyx69

    pyx69 New Member

    Solved again

    it was the new php-fpm security config option : security.limit_extensions

    you must add the name of the file without extension to be parsed to it.

    Ciao
    P.
     
  6. Koda

    Koda New Member

    I am having the same error mentioned in the original post. His issue regarding short_open_tag is not my issue, so I am still seeking help.

    What additional information is necessary? Vhost config as in my sites-available.conf with the vhosts themselves, or all of apache2.conf?

    Thanks.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    The error message can also mean that apache is restarted. So do you face any issues with running your website or do you have just this message in the log file without any other symptoms when browsing your website?
     
  8. Koda

    Koda New Member

    There are no symptoms that I've come across, everything seems to be functioning fine. The log notices only appear when I do restart apache or the machine. When I had Googled around most people made it sound like the messages were due to processes not being terminated correctly, or something to that effect -- so I figured that it was a legitimate error or misconfiguration.

    Perhaps not.

    Thank you for your insight, either way.
     

Share This Page