Results 1 to 3 of 3
Mar 24, 2013, 12:50 #1
Installing PHP on Mac OS X Lion 10.7.5
I'm reading PHP & MySQL Novice to Ninja (5th edition) 2012.
I've installed MySQL and PHP in my Mac OS X Lion (10.7.5). And I'd like to check the following:
- Installing PHP (p. 407):
1. In the Finder menu bar, choose Go to folder and type /private/etc/apache2, before clicking go.
2. In the Finder window that opens find the httpd.conf. This is the Apache configuration file. By default, it's read only. Right click the file and choose Get info to open the file properties. Scroll down to the bottom of the httpd.conf info window to find the sharing & permissions setting. By default the settings are disabled. Click the lock to enable them. Enter password. To make this file editable, change the value in the Privilege column for everyone to Read & Write.
That's fine up to there. Then says (p.408):
3. Back in the finder window for the apache2 folder, right-click in the background of the folder window and choose get info to open the folder's properties. As in the previous step, set the Sharing & Permissions settings from everyone to Read & Write.
What I don't understand is what folder should I double click here as the apache2 folder has many folders inside.
When I finished the installation I then went on to "your first php script" (p.21)
I saved the today.php file in /Library/Webserver/Documents but got a window in Komodo saying:
"There was an error attempting to save today.php. Permission denied.
That's why I was going back over the installation.
Thanks a lot.
Mar 25, 2013, 01:33 #2
- Join Date
- Mar 2009
- Melbourne, AU
- 460 Post(s)
- 8 Thread(s)
Please don't double post. If you feel a thread is in the wrong forum, just report it and we can move it.
Mar 25, 2013, 06:21 #3
Now I set the permissions for the apache2 folder, but still get this message when I try to save today.php:
"There was an error attempting to save today.php. Permission denied".
I went over the installation:
- Allowed web sharing.
- Allowed permissions to read and write in the apache2 folder and the httpd.conf file.
- Edited the httpf.conf with Komodo
#LoadModule php5_module libexec.apache2.libphp5.so (deleted the # to enable the line).
- Restarted Apache in the Terminal:
Machine:∼ user$ sudo /usr/sbin/apachectl restart
- Checked http://localhosot, which is running fine.
- In the terminal wrote:
Machine:∼ user$ cd/ private/etc
Machine:etc user$ sudo cp php.ini.default php.ini
Password: (type password)
- Edited the php.ini folder by changing:
mysql.default_socket = /tmp/mysql.sock
mysqli.default_socket = tmp/mysql.sock
- In the Terminal I wrote:
sudo/ usr/sbin/ apachectl restart
This is all following the book. What else should I check?