Using pkg_add for Apache and PHP

Hi,

I tried to install Apache and PHP with precompiled packages using pkg_add. Unfortunately, this will NOT install libphp5.so and therefor this combination will not work. I have searched about this extensively and what I found is that many others had the same problem and the usual response is to use the ports and compile PHP. Also, many times people advice against a mixing pkg_add installed packages with self compiled ports.

I did choose for pkg_add because I have a low computing power system (600 MHz processor with 512 MB RAM). My guess is that Apache with PHP
is a very often used combination. Why is there not a package that delivers libphp5.so that can be used by Apache?
 
It might be worthwhile filing a request by using send-pr(). I don't know if it would get a response, but your point seems valid.

You might be able to (untested by me) install www/apache22 or www/apache24 by package and then build the lang/php5 port, as another possibility. (Untested by me, but I do know that if you install lang/php5 as a port and choose to add apache in the configuration dialog, on 9.2-RELEASE, at least, it will pull in www/apache22, not www/apache24. On the other hand, if you install www/apache24 first, then choose to include apache support when installing lang/php5, it won't pull in a version of apache.

I repeat I haven't tested trying that particular solution, of using an www/apache24 package with lang/php5, nor do I know if it's viable for you, but it's one possible alternative to save at least some compiling.

EDIT: I should add a further warning that many feel it's a bad idea to mix ports and packages, and I've been bitten by it myself--for example, installing package X, then port Y needed a different version of a dependency of package X, so I wound up doing double work, so to speak.
 
Back
Top