Recompiled PHP, now Apache not parsing PHP files
I recompiled PHP earlier today, now when you access PHP pages in a browser, Apache displays its source code instead of parsing it. Do I need to reset some configuration or recompile Apache?
This is on Centos 5.5 with Apache 2.2 and PHP 5.2.17
Check to make sure your libphp.so (or libphp5.so) is in the correct place. If it got installed in a different place, you’ll need to update where apache thinks it is. Depending on how you’ve got apache setup, there should be an IfModule block that loads the apache module. It’ll look something like this:
<IfModule !mod_php5.c>
LoadModule php5_module /usr/lib/php5.3/apache2/libphp5.so
</IfModule>
The path and module name may be different. But if that’s all fine, it may be you’re using an “Action” with ExecCGI, for example:
AddHandler php-cgi .php
Action php-cgi /var/www/localhost/cgi-bin/php.cgi
The path to the cgi module may have changed.
Check more discussion of this question.
Related posts:
- How to directly send *.php.html files to browser without passing throught PHP? (Apache)
- Apache not parsing files? Just sending downloads
- PHP as a CGI binary vs. PHP as an Apache module
- Local .htaccess strangely allowed running PHP in CGI/FastCGI mode in Apache under shared hosting environment
- I can’t understand how can i load fastcgi module to apache and run php :S …?
Leave a comment
Recent Posts
- Windows File Permissions and Attributes
- What is the easiest way to upgrade my existing Perl 5.14 to Perl 5.16 on FreeBSD 9 using the ports system?
- Know if mysql has done its job
- Redirect https .com to https .co.uk without a valid SSL cert on .com without DNS change
- Why is it a bad idea to use customer email as from address





