I did: port install php5 +apache2 +mysql5 cd /opt/local/apache2/modules /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so and restarted apache2 But I still see no reference to mod_php anywhere, and php files are still treated as text by the browser. What am I missing, here?
On 5.12.2007, at 14.06, Russell Gold wrote:
I did:
port install php5 +apache2 +mysql5 cd /opt/local/apache2/modules /opt/local/apache2/bin/apxs -a -e -n "php5" libphp5.so
and restarted apache2
But I still see no reference to mod_php anywhere, and php files are still treated as text by the browser. What am I missing, here? _______________________________________________
Do you have the corresponding LoadModule line in your httpd.conf? I have ('grep php /opt/local/apache2/conf/httpd.conf'): LoadModule php5_module modules/libphp5.so DirectoryIndex index.html index.php Include conf/extras-conf/mod_php.conf (the first is necessary, the rest not) ! ! Jyrki Wahlstedt ! http://www.wahlstedt.fi/jyrki/ ! ! Our life is no dream; but it ought to become one and perhaps will. ! PGP key ID: 0x139CC386 fingerprint: F355 B46F 026C B8C1 89C0 A780 6366 EFD9 139C C386
On Dec 5, 2007, at 7:50 AM, Jyrki Wahlstedt wrote:
Do you have the corresponding LoadModule line in your httpd.conf? I have ('grep php /opt/local/apache2/conf/httpd.conf'): LoadModule php5_module modules/libphp5.so DirectoryIndex index.html index.php Include conf/extras-conf/mod_php.conf
(the first is necessary, the rest not)
I did have the first line. What I did not have, and what proved to be the difference, was the include statement (which makes apache recognize the .php file extension). The install actually placed mod_php.conf in a different directory, so I didn't see it. Moving it to conf/extra and including it make everything work. Thanks!
On Dec 5, 2007, at 07:26, Russell Gold wrote:
On Dec 5, 2007, at 7:50 AM, Jyrki Wahlstedt wrote:
Do you have the corresponding LoadModule line in your httpd.conf? I have ('grep php /opt/local/apache2/conf/httpd.conf'): LoadModule php5_module modules/libphp5.so DirectoryIndex index.html index.php Include conf/extras-conf/mod_php.conf
(the first is necessary, the rest not)
I did have the first line. What I did not have, and what proved to be the difference, was the include statement (which makes apache recognize the .php file extension). The install actually placed mod_php.conf in a different directory, so I didn't see it. Moving it to conf/extra and including it make everything work. Thanks!
What directory did it place it in? Is this something I should be changing in the php5 port to make installation easier? Since I've had php5 installed for so long, I've forgotten what steps were required, and it's sometimes hard for me to see the newcomer's perspective here.
participants (3)
-
Jyrki Wahlstedt
-
Russell Gold
-
Ryan Schmidt