I wanted a wiki on my Mac Mini - why? I forget. I found that Installing Wikka Wiki on Mac OS X seemed to be popular. And it doesn't take into account Leopard.
The docs mainly work. The first thing you need to do when installing php is make the change to uncomment this:
stealth:apache2 tdh$ pwd /private/etc/apache2 stealth:apache2 tdh$ grep php httpd.conf LoadModule php5_module libexec/apache2/libphp5.so
I'm using a Terminal shell.
And before you can start viewing private web pages, you need to not only turn on 'System Preferences' -> 'Sharing' -> 'Web Sharing', you need to add the following:
stealth:users tdh$ pwd /private/etc/apache2/users stealth:users tdh$ more local.conf # # Allow access to all users' Sites directory for web clients. # <Directory "/Users/*/Sites/"> Options Indexes MultiViews AllowOverride None Order allow,deny Allow from all </Directory>
Okay, you need to restart apache!
stealth:sbin tdh$ sudo apachectl restart stealth:sbin tdh$
And when you install MySQL, you need to create a db and some permissions:
stealth:sbin tdh$ sudo mysql -u root -p Enter password: Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 4 Server version: 5.0.45 MySQL Community Server (GPL) Type 'help;' or '\h' for help. Type '\c' to clear the buffer. mysql>
Note that you can do a 'sudo w' before this to make sure you have a cached password for 'sudo'. The password you want to give here is the one for the 'root' account in the database.
Create a database and an admin:
mysql> create database wakki;
Query OK, 1 row affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON wakki.* to 'wakki'@'localhost'
-> IDENTIFIED BY 'change_me' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT ALL PRIVILEGES ON wakki.* to 'wakki'@'%'
-> IDENTIFIED BY 'change_me' WITH GRANT OPTION;
Query OK, 0 rows affected (0.00 sec)
mysql> exit;
Bye
stealth:sbin tdh$
Note, I am not a MySQL expert or even a database expert. I just adapted what I found at 5.5.2. Adding New User Accounts to MySQL.
Okay, now try to load the webpage for the configuration. It will ask you questions and eventually when you tell it to Connect, it will tell you it was not able to verify the connection. The issue is that the stock php from Apple does not communicate in the same place as the MySQL. You can configure this as:
stealth:etc tdh$ diff php.ini.default php.ini 760c760 < mysql.default_socket = --- > mysql.default_socket = /tmp/mysql.sock
And then restart apache.
Note, I had to reboot. I don't know what wasn't reloading, it may have been the difference between '/private/tmp' and '/private':
stealth:etc tdh$ ls -la /tmp/mysql.sock srwxrwxrwx 1 _mysql wheel 0 Dec 17 22:51 /tmp/mysql.sock stealth:etc tdh$ ls -la /private/tmp/mysql.sock srwxrwxrwx 1 _mysql wheel 0 Dec 17 22:51 /private/tmp/mysql.sock
I guess that change should really be to '/private/tmp/mysql.sock'.
Oh, and the form loaded correctly now.