Forum Moderators: phranque

Message Too Old, No Replies

Problems installing php

         

mehh

12:55 pm on Jul 10, 2007 (gmt 0)

10+ Year Member



my problem is that apache is serving up the php as is rather than running it. as far as i can tell the problems is somewhere around this part of my httpd.conf file:
#BEGIN PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL
Action application/x-httpd-php "C:/Program Files/PHP/php-cgi.exe"
PHPIniDir "C:/Program Files/PHP"
LoadModule php5_module "C:/Program Files/PHP/php5apache2.dll"
#END PHP INSTALLER EDITS - REMOVE ONLY ON UNINSTALL

jdMorgan

8:01 pm on Jul 10, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is a MIME-type problem and/or a handler problem, where the PHP file is being served as a "page" instead of being executed on the server with its output as the "page" to be served.

The relevant Apache directives are AddType and AddHandler. Normally, you'd just use AddHandler, but due to differences in the way that PHP can be run --as cgi or as a module-- you often have to use AddType instead. This is due to a kludge in the way that PHP is "hooked-in" to Apache.

For more information, see the various "How to install PHP" and "installing AMPP" threads in our PHP forum library [webmasterworld.com].

Jim

mehh

8:08 am on Jul 11, 2007 (gmt 0)

10+ Year Member



thanks