Apache downloads php file instead of running script
I trashed my Karmic Ubuntu install and installed Lucid (I had heard that the boot times were much reduced and I didn't see any improvement in my normal upgrade).
I reinstalled Drupal but find that my installation of Apache does not run the scripts, but rather passes the php text file to the browser. IIRC when I installed it apt configured Apache correctly without me having to edit .htaccess or /etc/apache2/httpd.conf which makes me think that I am missing a key dependency. Does anyone know of a check list to which I can refer to make sure that I've installed everything? My installation has Postgres instead of MySQL. Failing which, in the event that my memory is faulty, where can I find which changes need to be applied to the configuration files above? |
There are, usually, two reasons that PHP won't run in Apache -- PHP is not being loaded or index.php is missing.
PHP gets loaded by, down toward the bottom of httpd.conf Code:
# Uncomment the following line to enable PHP: Code:
# Hope this helps some -- and don't forget to stop and restart httpd if you change anything in httpd.conf. |
Quote:
My /etc/apache2/httpd.conf file is EMPTY! Moreover there is no /etc/httpd/ directory. So the installation is borked. Reinstall apache? |
selinux
I was having a similar problem on a centos server a while back, It turned out to be selinux, I set it to passive and worked like a charm.
|
Quote:
Sometimes your mileage may vary -- looks like your installation is in /etc/apache2 rather than /etc/httpd. There ought to be an httpd.something-or-other file that you're supposed to copy into httpd.conf and edit. There also ought to be a php.ini (or php.ini-recommended or php.ini-dist) sitting in there (or someplace else?) for you to edit (you want to wind up with php.ini and include that in your httpd.conf) and the same for php_mod.conf). Seems like most distributions install stuff where it ought to be and yours may just have used apache2; files and methods are the same, however. Hope this helps some. |
All times are GMT -5. The time now is 01:51 PM. |