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 ?”

  1. krishna
    March 24th, 2010 @ 6:03 am

    This saved my day. Thank you for sharing the solution.

  2. nooga
    March 26th, 2010 @ 1:37 pm

    I did that and it still soes not work. Help :{

  3. Marco
    March 27th, 2010 @ 11:19 am

    This bug was commented today in version 5.3.1-5ubuntu2 at /etc/apache2/mods-available/php5.conf

  4. WC
    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.

  5. Patrizio
    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! :)

  6. Saeid
    April 17th, 2010 @ 11:27 am

    Yes! thank you :)

  7. Primatology
    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!

  8. Robert Ian Hawdon
    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!

  9. ms.shams
    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

  10. Marco
    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.

  11. RoalArji
    May 8th, 2010 @ 3:21 pm

    oooh man thanks, you save my life

  12. Don
    May 11th, 2010 @ 6:26 pm

    This DID NOT work for me

  13. Jay
    May 20th, 2010 @ 2:23 pm

    This did not work for me either

  14. Jonathan
    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.

Leave a Reply







Who Am I ?

I'm Marco Rodrigues and I currently work in Luxembourg as System Administrator.

Contact me.








Subscribe to my feed

Search

    Writing

    26 articles
    1491 comments

      Comments

      platforms
      windows 1431
      linux 21
      macos 3
      sun 0
      wp 0

      browsers
      ie 1361 
      opera 66 
      firefox 52 
      safari 14 
      chrome 11 
      bonecho 0 
      flock 0 
      epiphany 0 
      konqueror 0 
      iceweasel 0 
      lynx 0 
      netnewswire 0