I got some emails asking how to install PHP here is what i anwsered:
Ok, to install PHP you have to do the following, first
be sure that you are in the terminal and that you have root
rights (you can type 'whoami' and it has to say 'root')
if you don't know how to get root rights then mail me.
go to the directory where you unstuffed (GZ and TAR) the
php-4.04l1 distribution files and type the following commands (each one will take a few minutes):
# ./configure --with-mysql --with-apxs
# make
# make install
(only) then copy php.ini-dist to /usr/local/lib/php.ini
and then you have to edit apache config
/private/etc/httpd/httpd.conf
i think it was around line 819 where you have to UNcomment
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
and around line 240 be sure that the next is available:
LoadModule php4_module libexec/httpd/libphp4.so
and around line 280 there is:
AddModule mod_php4.c
also i found that around line 356 be sure to give a servername because in my situation the user directories didn't work (http://192.168.0.10/~username tries to connect to
http://localhost/~username which doesn't work if you try to connect from another computer) if your computer doesn't have a REAL internet name (like
www.apple.com) use your IP number:
ServerName 192.168.0.10
Once you have made these changes and saved the file, you should be ready to restart your server and try it out. in the terminal type:
# apachectl restart
Create a test file named test.php in your web tree somewhere and put some test PHP tags in it. <?phpinfo()?> is a good first test. This tag tells PHP to do a braindump and tells you all sorts of things about itself.
********** ALSO READ THE "INSTALL" FILE *************
you're now in PHP business.
Regards,
tr909
ps. From what i read in other topics, if you try
to enable the 'shipped with MacOS-x version of' php that it
won't work.. (but i didn't try). perfectly understandable
since Apple might have other priorities to work on for the
shipping macOS-X.
ps2.
I found info on the PEAR error at the end of the compile,
it was far, far away in the forums i'm no UNIX diehard so
i don't know how serious this is:
http://forums.macnn.com/cgi-bin/Foru...ML/000327.html
snippet:
| PEAR still doesn't build due to a problem with HFS(+)
| not storing pear and PEAR as different files...
| But this is a minor issue, and if someone with OS X on
| UFS built it, it should work...
[This message has been edited by tr909 (edited 03-26-2001).]