Your public_html with PHP5 isn’t working in Ubuntu 10.04 Lucid ?
Posted on | March 4, 2010 | 14 Comments
This weekend I’ve dist-upgraded from Ubuntu 9.10 *Karmic* to Ubuntu 10.04 *Lucid*, but only today I got a problem…
This was a big headache to figure out. First I got uninstallable packages for Apache2. In one or two hours I got the mirror updated and then installed it again, but my public_html with PHP5 stopped working.
I tried many things, like apt-get –reinstall, aptitude -o DPkg::Options::=”–force-confmiss” on apache2 + php5 packages and nothing was solving my problem.
So I’ve investigated a little more.. why the hell my ~userdir isn’t working with PHP5 and keep me asking to download the php source file, when the ‘localhost’ was working perfectly. Damn.. a bad day? ;(
So let’s analyze it..
$ sudo vim /etc/apache2/mods-enabled/php5.conf
<ifmodule mod_userdir.c>
<directory /home/*/public_html>
php_admin_value engine Off
</directory>
</ifmodule>
Looks like the php engine was disabled for public_html directories, so we need to change it from Off to On and then: $ sudo service apache2 reload
Still not working.. but after some hours later of investigation, I figured out that if I comment that lines of mod_userdir.c and then: $ sudo service apache2 reload, it will just work like always.
# <ifmodule mod_userdir.c> # <directory /home/*/public_html> # php_admin_value engine On # </directory> # </ifmodule>
Just this
Why “php_admin_value engine On” doesn’t work? It was supposed too..
P.S:. This bug was fixed in version 5.3.1-5ubuntu2 at Ubuntu Lucid 10.04.
Comments
14 Responses to “Your public_html with PHP5 isn’t working in Ubuntu 10.04 Lucid ?”
Leave a Reply


1431
21
3
0
0
1361
66
52
14
11
0
0
0
0
0
0
0
March 24th, 2010 @ 6:03 am
This saved my day. Thank you for sharing the solution.
March 26th, 2010 @ 1:37 pm
I did that and it still soes not work. Help :{
March 27th, 2010 @ 11:19 am
This bug was commented today in version 5.3.1-5ubuntu2 at /etc/apache2/mods-available/php5.conf
March 27th, 2010 @ 8:25 pm
-sigh-
This is a pretty big change for some people. To have it hidden like that is a big pain in the rear. Even hiding it in the userdir.conf would have been more logical.
April 15th, 2010 @ 9:08 am
I have version 5.3.2 on Ubuntu 10.04, and I had the same problem. Thank you! You saved me a lot of time!
April 17th, 2010 @ 11:27 am
Yes! thank you
April 18th, 2010 @ 3:48 am
I owe you one. I spent a good half hour trying to figure this out, until I had the bright idea of Googling it and stumbling across your blog.
Thanks again!
April 29th, 2010 @ 11:53 pm
Had this problem on my server, now that Lucid Lynx has been released… cheers for the info on sorting this out!
May 2nd, 2010 @ 10:05 pm
Hey, i do this, but still the problem exist. please help me, i need top PHP very much. thank you
May 2nd, 2010 @ 10:09 pm
If you have done this and doesn’t work, maybe the problem isn’t this one but another. Check you home directory permission (chmod), apache2 userdir module, etc.
May 8th, 2010 @ 3:21 pm
oooh man thanks, you save my life
May 11th, 2010 @ 6:26 pm
This DID NOT work for me
May 20th, 2010 @ 2:23 pm
This did not work for me either
July 27th, 2010 @ 11:49 am
@Jay & Don. If it doesn’t work and you need assistance you can try the Ubuntu forums, the Apache http docs, IRC channels. Issues like this are always solveable and for the most part the community at large will try to help. However just saying ‘This DID NOT work for me’ will at best glean you zero replies and at worst earn you a serious flaming. I find that if you provide as much information as you can people will gladly help.