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.
7 Responses
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Haha, thanks! I was scratching my head for a few minutes (regarding mod_php) before I stumbled upon your blog
this is what I was missing as well. thanks for your effort to post it. Cheers!
And again an happy user with your blog
Greetings from Rotterdam, NL
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?
Awesome, thanks!
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