HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   Using-php5-fpm-with-apache2 (http://www.howtoforge.com/forums/showthread.php?t=56162)

pyx69 13th February 2012 18:59

Using-php5-fpm-with-apache2
 
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.

falko 14th February 2012 14:09

Can you post your vhost configuration and the output of
Code:

netstat -tapn
?

pyx69 14th February 2012 14:27

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.

pyx69 22nd February 2012 15:34

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

pyx69 22nd February 2012 17:00

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.


All times are GMT +2. The time now is 10:50.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.