Skip to content


FreeBSD Ports: What Happened to mod_php5?

I’m recompiling PHP5 on my server to add PostgreSQL support, and couldn’t figure-out why all of the various mod_php* ports had disappeared from the ports/www. Turns out you need to enable PHP to do its own Apache support now. To have PHP build an SO for Apache:


bash-2.05b# cd /usr/ports/lang/php5
bash-2.05b# make config

Select the check box that mentions Apache, and you should be good to go.

Don’t forget to do the same steps in lang/php5-extensions to install things such as MySQL support if you’re upgrading or installing PHP5.

This change is kind of annoying as I’d rather be able to build mod_php independently since it’s more intuitive, but oh well.

Posted in A Day In The Life Of, FreeBSD.

7 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Tom said

    Haha, thanks! I was scratching my head for a few minutes (regarding mod_php) before I stumbled upon your blog :)

  2. Andy said

    this is what I was missing as well. thanks for your effort to post it. Cheers!

  3. And again an happy user with your blog :)

    Greetings from Rotterdam, NL

  4. The annoying part about this change is that the PHP5 package you can easily get with pkg_add -r php5 isn’t built with Apache support, and so you’re forced to do this via ports. What’s the point, then, of having a package? For all those people who want to run PHP scripts at the command line?

  5. Brian said

    Awesome, thanks!

  6. Installed Apache 1.3 and PHP 5. mod_php5 gone. What to do? Found this great article, that reminded me of the separated Apache module. However, running a make config and selecting the Apache module was not sufficient for me. PHP 5 would not create the Apache module. I then did a make deinstall, make config and make reinstall. Still no Apache module. Hmm. I then did a make deinstall clean, make config and then make install. This time it worked.

Continuing the Discussion

  1. Open Souce Solutions - Blog » Where did mod_php go? linked to this post on August 30, 2006

    [...] I couldn’t find mod_php on FreeBSD the other day. I found the answer here. [...]

Some HTML is OK

(required)

(required, but never shared)

or, reply to this post via trackback.