Install and configure Apache, MySQL & PHP on OS X Lion 10.7 and 10.6

How to install and configure Apache, MySQL and PHP on Mac OS X 10.7 Lion and OS X 10.6 Snow Leopard.

OSX 10.8 Mountain Lion Version OSX 10.9 Mavericks Version
Apache and PHP already come preloaded in OS X 10.7 Lion and 10.6 Snow Leopard, the versions on 10.7 Lion are PHP 5.3.6 and Apache 2.2.20, these 2 pieces of Open Source software are part of the “AMP” stack with MySQL the missing third component.

A – Apache      M – MySQL      P  – PHP

Their are other options for Mac users to install an AMP stack using prebuilt point and click downloads including the following, MAMP, DAMPXAMPP and BitNami – these installations use separate binaries outside of the regular OS X software so no conflict occurs and it makes it easier to delete the stacks without affecting other parts of the operating system.

However sometimes you need to configure these with different port numbers and this can lead to issues and there is the question of vendor support and application versions.

This tutorial bypasses the 3rd party AMP stacks and uses the native installed components with the exception of MySQL which is a separate install, unless you have OS X Server, which then MySQL comes preloaded in 10.6 but not 10.7 which has dumped MySQL in favour of PostgreSQL instead – you can still install MySQL on 10.7 Server with the instructions below.

To get Apache, MySQL and PHP running natively on OSX is quite easy and straightforward  – this guide should have you up and running in no time.

This guide uses the command line to achieve some text editing of various configuration files, however If you aren’t comfortable in the Terminal you can do this in a graphical mode, download a free text editor utility call TextWrangler, launch it, when you come to edit one of the configuration files, open file, you have to click on “show hidden items” at the bottom of the open dialog box to see all of the system files. But you will still need to use the terminal for some of the commands which don’t involve editing files.

PHP

You can verify your version of PHP  by launching the Terminal application, as found in the Utilities folder: /Applications/Utilities/Terminal

To find the PHP version, type at the prompt:

And the version is displayed:

To find the Apache version, type at the prompt:

And the version is displayed:

So far so good, however by default PHP is not enabled and has to have its module loaded you need to make a simple edit in the Apache configuration file “httpd.conf” file. This is filed in /etc/apache2/httpd.conf, get there in the terminal by typing:

Then in the terminal you need to use a text editor either “vi” or nano” will do, this file also has stricter permissions so the “sudo” command needs to be used to edit the file, you will need to be an admin user to have permission to change the file, type:

and then your password.

Once in nano click “control+w” to get a search dialog, type “php” and this will bring you to the php module line:

Uncomment out the hash # to leave it like:

enable php module in nano

enable php module in nano

Finally type “control + x” to exit and when prompted save the change by typing “y”

MySQL

So now onto the 2nd piece of the puzzle, MySQL. You need to download it from http://dev.mysql.com/downloads/mysql/, chose Mac OS X ver. 10.7 (x86, 64-bit), DMG Archive for an Intel Mac the .dmg file is a point and click installation nice and easy, you can download the tar.gz also for a command line install. The easiest format is the .dmg file as it allows for an installation visually using the GUI.

When downloading you don’t have to sign up, look for » No thanks, just take me to the downloads!  – go straight to the download mirrors and download the software from a mirror which is closest to you.

After download open the .dmg and install:

  • mysql5.6.xxx.pkg
  • MySQLstartupitem.pkg
  • MySQLPrefPane

The first is the MySQL software, the 2nd item allows MySQL to start when the Mac is booted and the third is a System Preference that allows start/stop operation and a preference to enable it to start on boot.

mysql-install-osx-dmg

Installation of MySQL

Once the installs are done you can start the mysql server right from the System Preferences which has a new preference in the “Other” category called “MySQL” click start and now it is running.

mysql-system-preference-osx

mysql-system-preference-osx

To find the MySQL version from the terminal, type at the prompt:

This also puts you in to an interactive dialogue with mySQL, type \q to exit.

If you got the error:

then mysql was not started, go back to the System Preference and start the database.

After installation, in order to use mysql commands without typing the full path to the commands you need to add the mysql directory to your shell path, this is done in your “.bash_profile” file in your home directory, if you don’t have that file just create it using vi or nano:

and then add:

The first command brings you to your home directory and opens the .bash_profile file or creates a new one if it doesn’t exist, then add in the line above which adds the mysql binary path to commands that you can run. Exit the file with type “control + x” and when prompted save the change by typing “y”. Last thing to do here is to reload the shell for the above to work straight away.

Then test the path by just this time issuing the mysql command without the full path:

You will get the version number again, just type “q” to exit.

The next step is to set up a root password for mysql there are 2 ways to do this one is a regular way and the other provides additional security and disables all other access:

Regular Way

If you have set the path correctly as above:

!use the single quotes

Then when logging in to mysql:

!NB the no space between -p and the password

Securer Way

Go ahead and just hit enter if this is a new installation and no password currently exists, follow the prompts to set up a new root password – this is a root password just for mysql separate from the root password of OS X you should set this.

You also get asked about:

  • Removing anonymous users?
  • Disallow root login remotely?
  • Remove test database and access to it?
  • Reload privilege tables now?

If this is a new installation you can just answer yes to the questions.

Once the root user and password is set, you have to interact with mysql with the username and password, so access via command line is (note that there is no space between -p and the password):

So thats the two components installed with MySQL having a System Preference option to Start/Stop the database.

Apache

You can start/stop the Web Server Apache in the System Preferences under Sharing and checking the WebSharing box. (Sometimes you may have to toggle it on/off a few times to get it going).

web-sharing-turned-on

web-sharing-turned-on

This can also be accomplished in the terminal using:

Or restart the web server gracefully using the following:

Once you start your server the there are 2 x document root folders for sharing, one is a top level and the other is user account specific:

and

You should see a “It Works!” or a OSX welcome page depending on which document root you are at, in the finder these locations are found at your Sites folder in your home folder for local user:
/Users/username/Sites/

or at the higher level

/Library/WebServer/Documents/

At the user level in Lion 10.7 you may need to create the personal web sharing folder first, do this through System Preferences > Sharing > Web Sharing and click “Create Personal Website Folder” if it is created this will say ” Open Personal WebSite Folder”

open-create personal web folder

open-create personal web folder

The final thing to verify is that PHP is loaded and ready to go by creating a new text file, has to be plain text (use TextEdit) and typing in:

Save the file as phpinfo.php and save it to the Sites folder in your home directory. Now point your browser to:

You should see the full PHP configuration page. If you just see the code restart the web server to make sure the php module is loaded.

php-module-configuration

php-module-configuration

That’s it you are ready to develop and share!

The only difference between 10.6 and 10.7 are some incremental version numbers on Apache and MySQL otherwise the process is the same for both operating systems.

To get up and running with mysql and use phpMyAdmin to manage the mysql database, there is a guide here.

Then look at installing WordPress, Drupal and Joomla!!!

 

  • Kurt Morris

    Thanks a million! I tried a dozen different approaches to getting stuff working, and this did the trick quite nicely. Thanks for making it easy-to-follow and understand!

  • Carlos

    This was awesome.
    The part with the MySQL installation went super smooth, and there was no need for some of the “Terminal tricks” i had to do in previous installations. I’m surprised.
    In OS X Lion, MySQL was actually easier to install for me.

    KEEP UP THE GOOD WORK AND THANKS AGAIN!

  • Andrew

    Thanks for posting this — very helpful!

  • Jan

    Hello and thanks for these instructions. I am running into problems trying to get MySQL running. I have downloaded and installed 5.5.15 on OS X 10.7. However, when I try to start the MySQL server from either the command line or System Prefs nothing happens. The following error keeps being returned.

    ERROR 2002 (HY000): Can’t connect to local MySQL server through socket ‘/var/mysql/mysql.sock’ (2)

    Any help will be much appreciated.

    • Neil Gee

      Hi Jan,
      Try
      a) In Terminal fix the mysql 2002 socket error by:

      [code]sudo mkdir /var/mysql
      sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sock[/code]

  • Nauman

    I couldn’t find the details you gave for user, i tried different thing to access localhost/~user but i think it is not there so I might need to set root my self?

    I get this page if i simply write localhost
    Not Found

    The requested URL / was not found on this server.

    Apache/2.2.19 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at localhost Port 80

  • http://TheOnlyCog.com The Only Cog

    Brilliant article, just what I needed to get me back on track with MySQL after my Lion upgrade. thanks

  • derlinzer

    Until recently web sharing in Lion used 127.0.0.1 and 127.0.0.1/~user/ for websites. Now it uses 192.168.1.106 and 192.168.106/~user/, where 192.168.1.106 is the IP of my MacBook Air assigned by my router. Since i only want my websites for development purposes and not for online access i want to use 127.0.0.1 and 127.0.0.1/~user/ again.

    • Anonymous

      All machines use 2 IP addresses – the 127.0.0.1 is the local loopback IP address that is universal – the second one is the one deployed by your DHCP service on your router, typically 192.168.X.X

  • Mstone

    Work perfectly for me. Thanks

    m

  • Chirayu

    Its very easy to follow this steps. Just one thing to confirm, does PHP in os x Lion comes with the module GD library? if that does not work, then how can we make it usable in the same default PHP configuration.

    • Anonymous

      Just check the phpinfo.php – yes it is bundled

      • Chirayu

        great thing I got it working. Now last step, identifing the loaded php.ini file. I found one in /etc/php.ini.default. should I rename it to php.ini and restart the apache?

        • Anonymous

          No not a good idea – you have php already running – renaming files will stuff things up. If you need to know more about the php distribution – reread the post above about phpinfo.php

          • M.W.

            I tried to change the ‘upload_max_filesize’ option. First i edited php.ini.default with terminal en checked it in Finder. Reboot of Apache. But still phpinfo() returns the old value. What am i doing wrong?

          • http://coolestguyplanettech.com Neil Gee

            Make a copy of ‘php.ini.default’ and name it ‘php.ini’ in the same spot
            Make it user writeable
            Edit the filesize upload option
            Restart Apache

  • http://www.facebook.com/alexdelivery Alex Delivery

    I tried the steps you described with enabled PHP. It works well. But I can not edit php.ini, because I can’t find it. I checked that with phpinfo. The problem is

    Configuration File (php.ini) Path: / etc.
    Loaded Configuration File: (none).

    Can you help me fix on this

    Thank you so much

    • Anonymous

      You can find it in /etc/php.ini.default

      • Anonymous

        To edit the file without using Terminal, download TextWrangler (free) go file>open, click on the option “Show Hidden Items” then navigate to your Macintosh HD >etc > php.ini.default make changes, you will need to put in an admin password when prompted.

  • Pingback: Installazione e configurazione di Apache, PHP e MySQL su Mac OS X | kOoLiNuS()

  • anarosa

    Works great. Thanks a lot!

  • DesignUtensil

    Thanks a million for this article. I followed your instructions the get PHP, Apache, and MySQL working beautifully on my Snow Leopard machine at work, but at home, Lion seems to be a different beast entirely. I followed all the instructions, but now when I try to check the box for “Web Sharing”, it just unchecked itself immediately. There are several “fixes” floating around on the first few pages of Google results, but I wanted to check here and see if you’ve run into this and what might fix it? Cheers!

  • Ahlofan

    very nice post! Thanks! I got a question. Where is the my.ini? or my.cnf? I need to set the max_allowed_packet

  • goofy-star

    Thanks a million for this article. Works great.

  • Pingback: Apache/PHP/MySQL for OS X | Christopher Esplin()

  • Anthony

    Thanks a lot dude. Absolute life-saver.

  • docB

    Hello Neil, I found your PhpMyAdmin solution after reading this, which helped me a lot – great, thank you.

    I wonder if I might be so cheeky to ask if you have anything this elegant on creating virtual hosts which would be my next step – I’m a recent convert from another technology and having been familiar with a rather different work environment with lots of different websites under development I’d like to begin to put the same structure in place on OSX, rather then having all the sites in one place.

    Tx, B

    • Anonymous

      Hi B,
      I haven’t documented how this is done on OSX as I use CentOS for live hosting.
      You use to be able to do this in OSX Server through a built-in GUI app, but I believe this is discontinued as of 10.7.
      You’ll need to uncomment out the “httpd-vhosts.conf” line in /etc/apache2/httpd.conf and then set up directives like so:
      http://httpd.apache.org/docs/2.2/vhosts/name-based.html

      If you want an app to do the code, this may be worth a look:
      http://clickontyler.com/virtualhostx/

  • Mark

    Hello Neil

    This is a great post. Thanks so much for it!

    I have one question for you if you might have the time Neil…

    This particular MySQL versions storage engine now defaults to InnoDB. I’ve been trying to get it to default to MyISAM. I’ve been trying all day to find the config file so that I can edit the “default-storage-engine” value to MyISAM. Tried also creating some cnf.ini files in a few places to do the same but no luck :(

    Do you know where I can find the config file its using to change the default storage engine?

    Cheers

    Mark

    • gposton

      /etc/my.cnf…
      If this file doesn’t exist create it by copying the default template in the /user/mysql/support-files/ directory into my.cnf

      Then add the config for default-storage-engine = MyISAM

  • http://www.facebook.com/tenpawelnowak Pawe? Nowak

    Thanks Neil!

  • http://twitter.com/baconandgames Sean James McKenzie

    Thanks so much for this. Extremely helpful!

  • 109278123

    I had the following problems and solutions :

    For PHP – httpd.conf is read only (even for root user) in Lion!

    *activating PHP5*
    username@[~] cd /etc/apache2/
    sudo chmod 777 httpd.conf
    sudo nano httpd.conf
    *activate PHP5 by uncommenting its line ; quite and save*
    sudo chmod 444 httpd.conf

    For MySQL –

    *making/editing the .bash_profile*
    cd ~
    nano .bash_profile
    *add the following to the file :
    export PATH=”/usr/local/mysql/bin:$PATH”
    quit and save*
    source ~/.bash_profile

  • http://twitter.com/marciotoledo Marcio Toledo

    Hi, it’s very helpfull. I’d like know how I use something like MAMP works.
    http://aproject:someport/
    http://anotherproject:someport/

    Do you have this info? Thank you very much!

  • Jonez

    Hello,
    at first I followed another tutorial on setting up A M P but somehow it didn’t work out, then I used this great tutorial and now it works :) Only problem is that somehow I can only access the top-level Document root via http://localhost. 
    for the user-specific Directory via http://localhost/~/ I always get an 403 error (Forbidden) Anyone knows how to solve this? Thank you very much

  • http://www.facebook.com/nash237 Naeem Ahmed

    Hi there i’ve managed to follow the steps until it came to the point where i should put this into my browser
    ‘http://localhost/~username/phpinfo.php’.I get this error
    Forbidden

    You don’t have permission to access /~username/phpinfo.php
    on this server.

    Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at localhost Port 80Please help!

    • http://coolestguyplanettech.com Neil Gee

      you are using your username right?

  • Nash237

    Hi there i’ve managed to follow the steps until it came to the point where i should put this into my browser

    ‘http://localhost/~username/phpinfo.php’.I get this error

    Forbidden

    You don’t have permission to access /~username/phpinfo.php
    on this server.

    Apache/2.2.20 (Unix) DAV/2 PHP/5.3.6 with Suhosin-Patch Server at localhost Port 80

    Please help!

  • Davo789

    Hi Neil,
    Brilliant post, thanks! I got to the bottom with no problem, except for the final thing. When I load “http://localhost/~username/phpinfo.php”, I just see the text “”! I’ve followed your post to the letter, so am a bit confused as to where I’ve gone wrong. Any pointers would be gratefully received.
    Thanks!

    • http://coolestguyplanettech.com Neil Gee

      just check the contents of phpinfo.php are:

    • Anonymous

      I had the same problem, when I directed my bowser to the php file, all I got was a read out of the text “”.

      To solve the problem, I restarted my computer. I have no idea why this worked but it did!

  • Davo789

    Thanks for the reply, but not to worry! All it took was a reboot and it’s now working as planned.

  • Pingback: Apache doesn’t recognize PHP using a Mac | Gravity Layouts()

  • darrin

    I can not get web sharing to stay on

  • theMrDrew

    Thanks A BILLION!!! Had run into issues with my installation and had to scrap and start from scratch – You saved me a ton on hours with the simple steps!!

    AMP enabled and running on all cylinders. Still need to install phpmyadmin, I see you have another post on that as well. “Installing phpmyadmin”

    Thanks again!

  • Mihirdutta

    I’ve used your method, however I would like to remove the AMP functionality from my Mac. How can I undo these steps?

  • http://whhnote.blogspot.com Hank Wang

    Your blog is really awesome! I like it!

    thanks your sharing!

  • Tim

    Thanks for an awesome post. I am having problems with MySQL though. I secured it the way you suggested, but whenever I try and do anything that involves logging in I get the message:

    ERROR 1045 (28000): Access denied for user ‘root’@’localhost’ (using password: YES)

    So I can’t go any further and create databases. My password has a + sign in it, and I was wondering if that’s causing a problem, but I can’t change it because I get the same error message.

    Any assistance would be really appreciated!

    Thanks,
    Tim

  • 20100101

    Hi,

    Great tutorial.
    Yet I still had a problem: when trying a file with php extension, I got the plein text instead. For instance, the browser gave me this:

    As if it isa text pad.

    So I found the solution here:
    http://akrabat.com/php/setting-up-php-mysql-on-os-x-10-7-lion/
    I needed to change the AllowOverride from none to All.
    Also, it gives a nice command to protect the httpd.conf file from future modifications:chmod u-w httpd.conf (can’t write)chmod u+w httpd.conf (can write)

    Regards,
    Yehuda

  • Lakshan H

    hello, after i did this my localhost not working any more, i used to put all my  web files under Library—> Webserver—> Documents. 

    safari canot connect to local host 

    any idea ?
     

    • http://coolestguyplanettech.com Neil Gee

      you can still use Library>WebServer>Documents to do the same thing

  • http://coolestguyplanettech.com Neil Gee

    what happens when you try http://localhost and http://localhost/~username/

    check in SysPrefs>Sharing that Personal Website Folder is created

  • http://twitter.com/magbicaleman Magbic Aleman

    How do you get virtual hosting to work. I added to the httpd-vhosts file and host, but I keep getting “It Works!” and not reading any of the index.html or index.php files I put in the Document Root

    • Shawn Koppenhoefer

       You’ve probably already figured it out, in the two months that have elapsed… but here’s what worked for me:

      0. Tell your mac the ip addresses:
           Edit /etc/hosts and add the site names:
              127.0.0.1 site01.local
              127.0.0.1 site02.local
       
      1. Tell Apache to do the virtual hosts thing:
           Edit httpd.conf (probably in /etc/apache2 )
           Find the line mentioning httpd-vhosts.conf and uncomment it.
          
      2. Tell Apache where to find the pages for the virtual sites:
           edit /etc/apache2/extra/httpd-vhosts.conf
           to contain this:

          DocumentRoot “/Library/WebServer/Documents/site01″
          ServerName site01.local
          ServerAlias *.site02.local
          ErrorLog “/var/log/apache2/site01.local-error_log”
          CustomLog “/var/log/apache2/site01.local-access_log” common

         same thing for site02

      3. restart Apache: in Terminal, do this:
          sudo apachectl graceful

  • Shubha Mathad

    Hi,
    Awesome article. It helped me lot to install everything step by step.
    Thanx a ton!!!

    The prob is wen I run the php file on my browser, it shows me the text code rather than php info.
    can you please help me solve this issue.

    Thanx in advance :)

  • Priyanshi

    awesome blog!! helped a lot!! :)

  • Bob

    Hi, it was a GREAT article…i just am unable to view the PHP configuration page when looking at http://localhost/~me/phpinfo.php…even though i have place a phpinfo.php in both webservers/documents/  and  me/sites/…i have tried the phpinfo.php file in just the documents file but i still only get the text 

  • Anonymous

    You are a god. This saved so much stress. A great future tutorial (if it’s not already on here somewhere) would be setting up multiple aliases in apache to point to different folders in the “Sites” directory…i.e. setting up a bunch of test sites for local development. Us front-end people aren’t really good enough with apache to do that on our own. 

  • Pingback: Lion Migration from IIS, A Novel « « Tech Law Notes Tech Law Notes()

  • http://www.facebook.com/profile.php?id=1844448459 Redmer Kronemeijer

    That was great! Within seconds I had php up and running. You’re great!

  • night_city

    Thanks!! That was a really helpful walkthrough that was detailed in a great way. So simple, yay!

  • Kundan Mac

    after a lot of hit n trial n reading… finally got it up n running…!!! Amazing article… cheers..!!

  • Vamsee

    Thanks for the wonderful post. It works like a dream.

    Kind Regards.

  • http://coolestguyplanettech.com Neil Gee

    hi, yes in Lion 10.7 you to initially create it by going Sys Prefs > Sharing > and then there is a button that says “Create Personal Website Folder” and if it is created it says “Open Personal Website Folder”

  • http://nellodee.wordpress.com/ nell

    Thank you SO MUCH for this tutorial. I’ll never go back to using MAMP again!

  • http://www.enemymovement.com/ NME

    By far most the best – SAY BEST tutorial on this topic! A while ago when I was about to get some stuff done on a local server for project I had to manually pick all needed infos together, ended up with two Apache-installs, a missing root-password for MySQL, and a non-working phpMyAdmin installation. It took me two days to get things sorted out – and now that I have to recreate the whole project for documentation-reasons I find your page – insane works! Thanks a lot, your efforts are really appreciated! You guided me along and I finished everything in no time – thanks so much!

  • Prateek

    Awesome, thanks :)

  • http://twitter.com/cbird1057 Chris Bird

    This is excellent. Much easier than other methods I’ve used it the past.
    The only mystery was:Then when logging in to mysql:
    $ mysql -u root -pyourpasswordhereI’m just not sure if this sets the password, confirms it, or is optional. I had to backtrack to get the PHPMyAdmin password to “take”, and by leaving this step out, things worked OK.Thanks a ton for this very useful step-by-step. 

  • Kurt Bigler

    The suggestion to use .bash_profile caused me some problems.  My previous .profile was in fact set up by the MacPorts package installer.  Creating .bash_profile for this caused the $PATH changes required for MacPorts to stop working.

    My impression is that using .profile is more general and using .bash_profile is perhaps ill-advised at least without a comment to the effect that if you are creating it new, it will cause any existing .profile to stop working.

    In my case, just because I worked on the MacPorts install months ago and dropped it, and also somehow lost the file in which I kept all my notes, I got really confused when I just re-approached the MacPorts install.  I assumed I must not have run the MacPorts install (or not correctly) because I checked my $PATH and saw that /opt/local/bin was not in it.

    Note that the MacPorts package installer modifies .profile automatically to add the /opt entries to $PATH, perhaps unless .bash_profile already exists in which case it may use that instead or as well–I don’t know all the details.  So running the MacPorts installer followed by your instructions was a bad combination.

    Other than that all your pages here were incredibly helpful.

  • Fgoellner

    Set up and works so far. But with php I cannot connect to my mysql db. The error message says: Warning: mysql_select_db(): Access denied for user ”@’localhost’ (using
    password: NO) in
    /Users/user/Sites/site/xy.php on line 36

    Warning: mysql_select_db(): A link to the server could not be
    established in /path/again …
    The db’s name is correct, it’s neither working with “root” nor with a newly dedicated user.

  • http://www.facebook.com/SDKlapperich Sean Klapperich

    It’s certainly worth mentioning that if you’re used to using “short tags” in PHP (i.e. <? instead of <?php) that you will need to turn it on via the "short_open_tag" setting, as it is not on by default. This led to some head scratching on my part, after attempting to run an already existing script, which obviously resulted in said script not being parsed.

  • http://profile.yahoo.com/C6U5QZVIJ4IGV7YQI7VZY5XLCA Triatmoko

    Why mySQl server doesnt show up on my system preferences?
    I have install successfully without any error message.
    thanks 

  • Husnayen Nanna

    thank you. you are the coolest………………………………

  • P A

    Thank you very much. I’m new to PHP and MYSQL and this was a great help.

  • Afiscruggs

    Thanks so much. This helped immensely

  • http://crimm.me Crimm

    I wanted to tell you thank you for this. This was a wonderful walk through!

  • Pingback: Setting Up A PHP/MySQL Web Server On A Mac | Montana Flynn()

  • dedawn

    Duuuuude! You rock! It’s so nice to get a walk through that doesn’t miss a step – so hard to do! Thanks :)

  • Clare

    Really great, clear, just worked. My first ever Tutorial as a mac user – a good sign, cheers :)

  • Ralf Engel

    i was hoping to get further with your site, but got stuck rite away on ”
    Utilities folder: /Applications/Utilities/Terminal”, now, where is that? and what is that? It sure isn’t on my computer… I got php 5.3 installed, but not working, apache server isntalled and working

  • Senior Olokon

    Very great tutorial

  • Juli Gupta

    great tutorial..had it working in minutes

  • Sag

    Thanks, great tutorial.

  • andrew

    Sweet! Easier than MAMP! haha

  • http://twitter.com/SergioTechMac SergioTech&Mac

    Simple and fantastic. It’s working fine in Mac Mini Server running Mac OS X Lion Server. I have my Blog back on track. Thank you!

  • Ketzaldev

    Very good tuto, thanks dude

  • Jhig85

    Very good tutorial and thanks. I just had a quick question. When I put files into my sites folder they work from the localhost, but when I create a folder in there and go “localhost/~username/folder/ ” I get a 403 forbidden message saying I don’t have permission to access this server. Do you know what the issue is?

  • Sergej Div.

    1+ Work

  • Pingback: Quick start PHP/MySQL guide for experienced programmers | it's time to make that cool website()

  • Tapos P

    great one!

  • Riquez

    Web Sharing checkbox in system prefs is OFF in my Lion, has no effect & Apache is always running regardless.

  • xAirbusDriver

    I had all this set up at least a year ago on my previous Mac and Snow Leopard. When it died I ended up with a new Core i7 iMac and it had Lion installed. Oh well… LOL! I was never able to get the MySQL/Apache/PHP setup working again, even downloaded MAMP! The only thing left that seemed to work was a bookmark to MySQL Admin. But it claims my password for ‘root’ is incorrect.

    Thanks to this page and your great instructions, everything seems to be working smoothly! Except for MySQL Admin still not accepting my password (Error #2002). Web Sharing is “Allowed” in the Firewall list. Also “mysqld” But I’m not sure that’s even a problem even though the 2002 error can result from being blocked by a firewall.

    I’m about ready to uninstall or simply download and reinstall MySQL Admin unless anyone has another suggestion. Looks like everything is in user/local/…

  • Pingback: MacMini server deel 14: Wordpress « AJvK.nl()

  • Pingback: Web Sharing and Mountain Lion Client | Winged Boar Pub()

  • Pingback: Developing PHP applications with a Mac « Hello, World!()

  • Pingback: Installing AMP on Mac 10.8 | Elihu Bogan()

  • Pingback: Installing AMP on Mac 10.8 Mountain Lion | Elihu Bogan()

  • Pingback: Developing PHP applications on a Mac « Hello, World!()

  • Pingback: How to set up php, mysql and php myadmin on Mac OS X | blog.dsetia.com()

  • Pingback: Config Apache MySQL PHP in Mac | Ratha 's Blog()

  • Pingback: Week 12: Working Locally, Custom Templates and Posts | Parsons Fall '12: Web Content Management Systems()

  • Pingback: Meninggalkan MAMP | andreanisme()

  • Pingback: Building a WordPress API widget for beginners – Part 1 | PrefadedPop()

  • Pingback: configurating web server on Mac OS | SiriusNote()

  • Pingback: OS 10.9()

  • Pingback: Goodbye MAMP: How I Built My Own AMP Stack » iCaspar()

  • Pingback: MasterApp: come creare una semplice app iOS. - Lobae Design()

  • Pingback: www.cra-mn.org()

  • Pingback: MasterApp #1: gettiamo le basi dell'app - Lobae Design()

  • Pingback: Installing a local database server on a Mac | Judi learns nerd too...()

  • Pingback: Native MAMP OSX 10.6.8 con Macports | Paco Rabadán()

  • Pingback: Install phpMyAdmin in OSX | 海蓝博客()