Installing PHP on Mac OS X Lion 10.7.5
I was reading PHP and MySql Novice to Ninja by Kevin Yank. I've decided to do the manual installation of MySql and PHP. I thought everything went fine. But when I open Komodo and try to save the first exercise, today.php I get a message that says:
"There was an error attempting to save today.php. Permission denied".
First I did a manual installation of MySql. That's working fine.
In the chapter explaining the manual installation of PHP, the book says:
- Allow web sharing.
- Allow permissions to read and write in the apache2 folder and the httpd.conf file.
- Edit the httpf.conf with Komodo:
Find this line:
#LoadModule php5_module libexec.apache2.libphp5.so. And delete the # to enable it.
- Restart Apache in the Terminal:
Machine:∼ user$ sudo /usr/sbin/apachectl restart
- Check http://localhost, which is running fine.
- In the terminal write:
Machine:∼ user$ cd/ private/etc
Machine:etc user$ sudo cp php.ini.default php.ini
Password: (type password)
- Edit the php.ini folder by changing:
mysql.default_socket = /var/mysql/mysql/sock
to
mysql.default_socket = /tmp/mysql.sock
and
mysqli.default_socket = /var/mysql/mysql/sock
to
mysqli.default_socket = tmp/mysql.sock
- In the Terminal I write:
sudo/ usr/sbin/ apachectl restart
I'm using Mac OS X Lion 10.7.5 . And I'm following the exact instructions in the book...Any ideas why I have that error?
Thanks a lot!
MacBook Pro (15-inch Late 2011), Mac OS X (10.7.5)