MySQL Prebuilt Binary for Mac OSXby Gavin Clark <gavin@datacor.com> |
5/5/01 - New version of PHP. 4.0.5 - this one compiled out of the box.
4/20/01 - Bug fix! If you have installed the mysql package please run the bug fix below.
4/9/01 - Newer version! MySQL-3.23.36
4/8/01 - I put the whole thing into an installer package so the mile long list of instructions is no more. It's now about as easy as it gets!
set file permissions - as root in terminal
chown root /usr/libexec/httpd/libphp4.so
chmod 755 /usr/libexec/httpd/libphp4.so
Don't forget to to edit the httpd.conf file to uncomment the lines relating to php.
LoadModule php4_module libexec/httpd/libphp4.so AddModule mod_php4.c AddType application/x-httpd-php .php AddType application/x-httpd-php-source .phps
tip:
To make ALL your html pages execute php code alter the AddType type line to include the .html sufix
AddType application/x-httpd-php .php .html
Restart apache and try out a php page.
Note: I had a problem where apache wouldn't start after I installed this copy of PHP - the problem was Stuffit Expander. It mangled the file when it un stuffed it. I unstuffed it again and it worked fine.
To install:
By installing from a binary you will get something a little different than what you get if you compile it yourself. The parts are all in one folder instead of scattered all over your disk, which I think is a better way to do it. You can stick the folder anywhere you want, I put mine in the Applications folder. You'll have to type the full path to the binaries to make them work from the terminal:
instead of
mysql -u bob -p football_stats
you type
/Applications/mysql/bin/mysql -u bob -p football_stats
To fix it follows these instructions. Thanks.
First stop the mysql server. (instructions are in the read me file in /Applications/MySQL-3.23.36) run these commands in the terminal: su niutil -createprop / /groups/mysql gid 85 niutil -createprop / /users/mysql uid 85 niutil -createprop / /users/mysql gid 85 /usr/sbin/chown -R mysql /Applications/MySQL-3.23.36/data/