php4.cgi php5.cgi


We have Virtualmin 3.17 installed on Fedora Core 4
We’ve found the following problem: when virtualmin creates a virtual server, it puts such directives in Apache VirtualHost:
Action application/x-httpd-php4 /cgi-bin/php4.cgi
Action application/x-httpd-php5 /cgi-bin/php5.cgi
AddType application/x-httpd-php5 .php5
AddType application/x-httpd-php4 .php .php4

As far sa I undestand, it means, that theese directive configures php (4,5) to run as cgi module
The problem is, that those *.cgi located in fcgi-bin folder.
But even if I’m adding a ScriptAlias to fcgi-bin, trying to execute any php or php5 script encounters server error - “Premature end of script headers: php4.cgi” or “Premature end of script headers: php5.cgi”

Could you please help on this.


Sergey Kuptsov

Hey Sergey,

Actually, the PHP4/PHP5 stuff is still a bit wonky–i.e. it doesn’t work.

You have to choose which one you want to use, at this point, and comment out the other. I recommend PHP4, since a lot of the Install Scripts scripts don’t support php5. I’ve almost gotten the issue straightened out with regard to fcgi, but it definitely won’t work right now.

So, pick your favorite php, and comment out the statements enabling the other one.

Oh, yeah, there’s a FAQ about the PHP issue here: