SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Enthusiast Prorsum's Avatar
    Join Date
    Dec 2012
    Location
    London
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Installing PHP on Mac OS X Lion 10.7.5

    Hi everyone,

    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.

  2. #2
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,117
    Mentioned
    448 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Prorsum View Post
    What I don't understand is what folder should I double click here as the apache2 folder has many folders inside.
    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).

    Off Topic:

    Please don't double post. If you feel a thread is in the wrong forum, just report it and we can move it.
    Facebook | Google+ | Twitter | Web Design Tips | Free Contact Form

    Forum Usage: Tips on posting code samples, images and more

    Forrest Gump: "IE is like a box of chocolates: you never know what you're gonna get."

  3. #3
    SitePoint Enthusiast Prorsum's Avatar
    Join Date
    Dec 2012
    Location
    London
    Posts
    44
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Ralph:

    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

    and

    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?

    Thanks.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •