PHP Apache 2.2 – Resolving Common Issues

apache-2.2PHPphp5web-server

I am having trouble using the php module with apache2. At the moment, testing with a phpinfo script, only php code is displayed as though it were text, no output at all.

I have the line LoadModule php5_module libphp5.so, with an absolute path.

Yet, when I do apache2 -t -D DUMP_MODULES |grep php, nothing is reported

I have my error level set to warn, and the last entry in my logfile after apache starts is

[notice] Apache/2.2.15 (Unix) PHP/5.2.12 mod_ssl/2.2.15 OpenSSL/0.9.8g configured -- resuming normal operations

Which implies there is php support?

Best Answer

Try grep -i php. Also do you have AddHandler php5-script .php anywhere in /etc/apache2/*.conf or in the vhost configurations?