Blog

Setup MAMP (Mac, Apache, MySQL And PHP) on Mac OS X 10.6 Snow Leopard

Mac OS X 10.6 Snow Leopard comes with Apache and PHP (Apache/2.2.17 (Unix) mod_ssl/2.2.17 OpenSSL/0.9.8l DAV/2 PHP/5.3.4), so it is quite easy to setup a MAMP server.

Sure, there are other ways to do the MAMP setup:

In my opinion, because Apache and PHP are already installed, it's easy way to go with them.

Apache 2.2.17

To enable pre-installed PHP, you have to edit httpd.conf file:

sudo vi /private/etc/apache2/httpd.conf

And uncomment the line:

LoadModule php5_module libexec/apache2/libphp5.so

If you want to make other configuration changes, for example define virtual hosts, it's better to use user's configuration file:

sudo vi /private/etc/apache2/users/[username].conf

After making changes, restart Apache aka Web Sharing. Go to System Preferences > Sharing and unselect and select again Web Sharing. That's it. Now you have the Apache with PHP running.

If there are any problems, you can examine the Apache error_log. Go to Console > /var/log > apache2 > error_log.

PHP 5.3.4

If you want to make changes to php.ini, do the following. Copy php.ini.default to php.ini:

sudo cp /private/etc/php.ini.default /private/etc/php.ini

And to make changes:

sudo chmod 644 /private/etc/php.ini
sudo vi /private/etc/php.ini
sudo chmod 444 /private/etc/php.ini

After making changes, don't forget to restart Apache.

MySQL 5.5.10

MySQL is a little trickier, because it's not pre-installed in OS X. In my opinion easiest way is to use binary from MySQL.com. So, download the current version, which is mysql-5.5.10-osx10.6-x86_64.dmg at the moment, and install mysql-5.5.10-osx10.6-x86_64.pkg.

Then install MySQLStartupItem.pkg and copy MySQL.prefPane to OSX/Library/PreferencePanes.

MySQL starts when the OS starts and you can start and stop it from System Preferences > MySQL. You can also start or stop it manually from console:

sudo /Library/StartupItems/MySQLCOM/MySQLCOM start
sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop

MySQL with default settings use socket in /tmp and pre-installed PHP presumes it to be in /var/mysql, so you have to update the location in php.ini:

mysql.default_socket = /tmp/mysql.sock

Mac OS X 10.6

No you should have your MAMP server running nicely. If you want to make host name changes – for example if you use different hosts in localhost to take advantage Apache's virtual hosting – edit hosts file:

sudo vi /private/etc/hosts

Setup MAMP (Mac, Apache, MySQL And PHP) on Mac OS X 10.6 Snow Leopard Read More »

How To Use iMovie’s Hidden Features to Create a Custom Lower Third

Did you know iMovie can handle some advanced features like picture-in-picture? This simple trick can improve the professional look and feel of any iMovie project and you’ll learn how you can put a custom logo as a lower third in any of your videos.

[Mac|Life: How To Use iMovie's Hidden Features to Create a Custom Lower Third →]

How To Use iMovie’s Hidden Features to Create a Custom Lower Third Read More »

15 Secrets of Transmit 4

Transmit is easy to use, but there’s a whole lot under the surface. Learn 15 secrets straight from the horse's mouth – Panic Blog.

  1. Add custom icons to your favorites
  2. Show the file count
  3. Skip files automatically
  4. Customize your favorites view
  5. Try dock send
  6. Make a droplet
  7. Quickly copy a web URL
  8. Navigate in both sides, simultaneously
  9. Make “Get Info” automatically update as you change files
  10. Learn some drag and drop tricks
  11. Show folders above files
  12. Zip files directly on an SFTP server (and more)
  13. Hide iDisk/Bonjour favorites or prevent Transmit disk from opening windows
  14. Get image dimensions using Quick Look
  15. Make a local/local or remote/remote Window
  16. Bonus tip! Customize keyboard shortcuts

[Panic: 15 Secrets of Transmit 4]

15 Secrets of Transmit 4 Read More »

Scroll to Top