LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Apache 2.2.9 mpm worker and php5 source formatting (https://www.linuxquestions.org/questions/linux-server-73/apache-2-2-9-mpm-worker-and-php5-source-formatting-713480/)

siggma 03-22-2009 12:41 AM

Apache 2.2.9 mpm worker and php5 source formatting
 
This is a non critical issue but I haven't seen any references elsewhere so I thought I'd ask.

I have a home server running debian 5.0, apache2-mpm-worker, php5.2.9-dotdeb as cgi under fcgid and eaccelerator 2.5.3. It's a tiny little PIII so ram is at a premium. Recently I switched from mpm-prefork to mpm-worker. I also switched from mod_php5 to php-cgi using fcgid. However after the switch my php source formatting disappeared.

When using mod_php5 I could copy a php script to phps and it was nicely formatted in the browser. Now it either strips php tags and dumps what's left or sends it as unrecognized mime type "phps" triggering a download. Has anyone else had this issue with apache2 mpm worker and php-cgi?


Relevant /etc/apache2/sites-enabled/000-default config lines:

#------------- PHP FASTCGI ---------------#
<IfModule mod_fastcgi.c>
ScriptAlias /cgi/ /usr/lib/cgi-bin/
AddHandler php-fastcgi .php
Action php-fastcgi /cgi/php
AddType application/x-httpd-php .php .phtml .php3
AddType application/x-httpd-php-source .phps
</IfModule>
#-----------------------------------------#

#------------ PHP FASTCGID ---------------#
<IfModule mod_fcgid.c>
AddType application/x-httpd-php-source .phps
AddType application/x-httpd-php .php
DefaultInitEnv PHPRC "/etc/php5/cgi"
MaxRequestsPerProcess 1000
# Maximum number of processes to spawn
MaxProcessCount 100
# Number of seconds of idle time before a php-cgi process is terminated
IPCCommTimeout 120
IdleTimeout 120
ScriptAlias /cgi/ /usr/lib/cgi-bin/
AddHandler php-fcgid .php
Action php-fcgid /cgi/php
</IfModule>
#-----------------------------------------#


All times are GMT -5. The time now is 07:14 AM.