SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    editing php.ini on OSX

    I'm just getting started with PHP... I don't have any programming experience so this is a pretty newbie question.

    I'm trying to get everything set up on OSX and I'm following the text in Patrick Lenz's book exactly how it says... the other day I got MySQL & PHP setup, got the password changed.. I'm on the part now where it says to edit the php.ini but I can't seem to get to that file to edit it. Also now, I can't seem to get any of the previous commands that I used the other day to work, it just keeps saying command not found.

    I think maybe I'm missing something but I'm about to pull my hair out. Please help!

  2. #2
    dooby dooby doo silver trophybronze trophy
    spikeZ's Avatar
    Join Date
    Aug 2004
    Location
    Manchester UK
    Posts
    13,788
    Mentioned
    151 Post(s)
    Tagged
    3 Thread(s)
    Hi and welcome to the forums

    I don't use macs but when you say you cant get to the file, do you mean you cant find it or cant edit it?

    look in
    /private/etc/php.ini

    If it's not that then I have no idea

    Cheers

    Spike
    Mike Swiffin - Community Team Advisor
    Only a woman can read between the lines of a one word answer.....

  3. #3
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi mattrateliff,

    On Mac OS X you will likely find the PHP.ini (php version 4.x) file in:
    /usr/local/lib
    Or php version 5.x
    /usr/local/php5/lib/
    Remember if you can't find php.ini in these locations then use always search for 'php.ini'.

    Keep in mind that normally if you change MySQL's password and you are using phpMyAdmin then you will have to update the MySQL password for phpMyAdmin too. Inside the phpMyAdmin folder open the file named config.inc.php with TextEdit and then make sure the following is set:
    • $cfg['PmaAbsoluteUri'] = 'http://localhost/phpMyAdmin/'; (make sure this is the path you are using)
    • $cfg['PmaAbsoluteUri'] = 'http://YourComputerName.local/phpMyAdmin/';
      The Computer Name for your Mac can be found on the Sharing Panel inside System Preferences.
    • cfg['Servers'][$i]['host'] = 'localhost';
    • Find the line $cfg['Servers'][$i]['controluser'] = ''; and enter root between the empty single quotes.
    • In the following line $cfg['Servers'][$i]['controlpass'] = ''; enter the root password inside the empty single quotes that you used when you installed MySQL.
    After making these changes save the config.inc.php file and restart your phpMyAdmin services (namely Apache and MySQL)

    If after attempting to make these changes, in addition to the changes you have been instructed to make in your php.ini file, you are still experience problems, then start from scratch. remove as much as you can find and then reinstall and start again.

    Regards,
    ServerStorm
    ictus==""

  4. #4
    SitePoint Member
    Join Date
    Feb 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    My problem was not being able to navigate to the php.ini file.. for some reason it all made sense in your post and I was able to find it though.

    My command problem is fixed now that I followed your directions ServerStorm.. thanks a bunch!

  5. #5
    Foozle Reducer ServerStorm's Avatar
    Join Date
    Feb 2005
    Location
    Burlington, Canada
    Posts
    2,699
    Mentioned
    89 Post(s)
    Tagged
    2 Thread(s)
    Hi mattrateliff,

    Glad you got it working!

    Best regards,
    ServerStorm
    ictus==""


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
  •