port install php5 fails on Leopard 10.5.4

Bill Hernandez ms at mac-specialist.com
Thu Jul 10 19:49:28 PDT 2008


On Jul 10, 2008, at 7:35 PM, kentozier at comcast.net wrote:

> I know how to activate the default Leopard PHP by opening the / 
> private/etc/apache2/httpd.conf file and uncommenting
>
> #LoadModule php5_module        libexec/apache2/libphp5.so
>
> but MacPorts seems to blaze it's own trail regarding file layout/ 
> install locations so how do I get Apache to use my newly compiled PHP?


make sure you are running phpinfo.php within the DocumentRoot (check  
httpd.conf)

-------------------------------------------------
APACHE
-------------------------------------------------
/opt/local/apache2/conf/httpd.conf
should show the three items below :

LoadModule php5_module modules/libphp5.so

Include conf/mod_php.conf

DocumentRoot "/Web/path/to/your/www"
-------------------------------------------------
PHP
-------------------------------------------------
Check the path exists :
/opt/local/apache2/modules/libphp5.so

$ open /opt/local/apache2/modules/

if you don't find this you might have to re-install php, but first try :
$ sudo find /opt/local -name libphp5.so

-------------------------------------------------
Check the path exists :
/opt/local/apache2/conf/mod_php.conf

$ open /opt/local/apache2/conf/

if you don't have it you might have to do :
$ sudo cp /opt/local/apache2/conf/extras-conf/mod_php.conf /opt/local/ 
apache2/conf/mod_php.conf
-------------------------------------------------
Check the path exists :
/opt/local/etc/php.ini

if you don't have it you might have to do :
$ sudo cp /opt/local/etc/php.ini-recommended /opt/local/etc/php.ini
-------------------------------------------------
MYSQL
-------------------------------------------------
Check the path exists :
/opt/local/etc/my.cnf

$ open /opt/local/etc/

if you don't have it you might have to do :
$ sudo cp /opt/local/share/mysql5/mysql/my-medium.cnf /opt/local/etc/ 
my.cnf
-------------------------------------------------
When you find { httpd.conf, mod_php.conf, php.ini, my.cnf } take a  
look at the changes you'll need to make. If you need any help, let me  
know...

Bill Hernandez
Plano, Texas




More information about the macports-users mailing list