I have recently installed the apache web server and the mod_php module to be able to parse php files. In the documentation of php I found out that apache needs to be configured in the following way: 1) Load the libphp5.so using LoadModule 2) Insert line "AddType application/x-httpd-php .php" 3) Insert line "AddHandler cgi-script .cgi .php" However, the web server won't parse any php files, even though execution of CGI is allowed in the whole document root. Trying to access a php file causes my browser to show up a "save file" dialogue. If I remove the line "AddHandler cgi-script .cgi .php" php files located other than in the cgi-bin directory get executed. I have no explanation for this. As described in the httpd.conf file this line is needed whenever scripts should be executed which are not located in the cgi-bin directory. Im not sure if this is really related to Crux but maybe some others encountered similar problems. For the installation of the packages I used: prt-get depinst apache php4 mod_php Hope that someone can help me! Greets Kevin Schenker ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
On Wed, Aug 29, 2007 at 05:31:03PM +0200, kevin.schenker@tu-ilmenau.de wrote:
I have recently installed the apache web server and the mod_php module to be able to parse php files. In the documentation of php I found out that apache needs to be configured in the following way:
1) Load the libphp5.so using LoadModule 2) Insert line "AddType application/x-httpd-php .php" 3) Insert line "AddHandler cgi-script .cgi .php"
However, the web server won't parse any php files, even though execution of CGI is allowed in the whole document root. Trying to access a php file causes my browser to show up a "save file" dialogue.
If I remove the line "AddHandler cgi-script .cgi .php" php files located other than in the cgi-bin directory get executed. I have no explanation for this. As described in the httpd.conf file this line is needed whenever scripts should be executed which are not located in the cgi-bin directory.
Either use php as a apache module or as CGI but not both. You should omit 3) from above. Maybe http://crux.nu/Main/ApachePorts is useful for you.
Im not sure if this is really related to Crux but maybe some others encountered similar problems. For the installation of the packages I used:
prt-get depinst apache php4 mod_php
php4 is a port of php version 4, mod_php the apache module for php 5. Why do you you want both of them ? Greetings Juergen -- Juergen Daubert | mailto:jue@jue.li Korb, Germany | http://jue.li/crux
Either use php as a apache module or as CGI but not both. You should omit 3) from above. Maybe http://crux.nu/Main/ApachePorts is useful for you.
Thanks for your answer! You were right. Enabling both won't work. Greets Kevin Schenker ---------------------------------------------------------------- This message was sent using IMP, the Internet Messaging Program.
participants (2)
-
Juergen Daubert
-
kevin.schenker@tu-ilmenau.de