Apache not parsing PHP files
I just had a confusing problem: instead of interpreting PHP-scripts in our webserver’s userdir apache serves them for download!
It’s caused by an upgrade from lenny to squeeze and I spend a lot of ours with fixing.
This is really a serious problem, these sites aren’t able to read for those people/search engines etc. that are browsing and, more fatal, if clients are able to access the PHP code of our students/staff they might explore security issues or passwords stored in these PHP files, so first of all I disabled the public access to the webserver.
So what was the problem? When I recognized that phpMyAdmin and other not userdir related stuff still works fine, I searched for issues that differ for userdirs. At long last I took a look into the
libapache2-mod-php5 config file located in
As you can see, PHP is disabled if the userdir module was enabled… Disgusting! Commenting these lines out switched PHP for users on. Very annoying!
- apache (15) ,
- aptitude (13) ,
- debian (38) ,
- fail (18) ,
- network (81) ,
- security (31) ,
- ugly (26) ,
- university (42) ,
- update (9)
Leave a comment
There are multiple options to leave a comment:
- send me an email
- submit a comment through the feedback page (anonymously via TOR)
- Fork this repo at GitHub, add your comment to the _data/comments directory and send me a pull request
- Fill the following form and Staticman will automagically create a pull request for you:
had the same, seen this file, did not notice the obvious. Thanks, you made my day. :)
This works. Thanks a bunch. Imagine this happen to a newbie. Almost made me switch to windows.