prorsum — 2013-03-24T14:50:35-04:00 — #1
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.
ralphm — 2013-03-25T03:33:33-04:00 — #2
I assume it's telling you to set the /apache2/ folder's permissions. You can either do that by clicking anywhere in the blank space inside that folder (i.e. not on any particular file) or by clicking the /apache2/ folder itself (that is, its actual name).
Please don't double post. If you feel a thread is in the wrong forum, just report it and we can move it.
prorsum — 2013-03-25T08:21:38-04:00 — #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
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
sudo/ usr/sbin/ apachectl restart
This is all following the book. What else should I check?
system — 2014-10-07T23:57:12-04:00 — #4
This topic is now closed. New replies are no longer allowed.