

- #MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN FOR MAC OS X#
- #MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN MAC OS X#
- #MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN INSTALL#
- #MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN PRO#
Please note that due to PHP 5.3 missing the FastCGI binary you must install it last. Install all versions of PHP you want to use. It's one of the binary distributions recommended on php.net and by far the easiest to install. We will be using the pre-built binaries offered at liip.ch.
#MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN PRO#
Pro tip: I recommend using Sequel Pro to manage your MySQL databases instead of phpMyAdmin. Sudo /Library/StartupItems/MySQLCOM/MySQLCOM stop Good to know: Even though MySQL auto-starts on boot, you can still start and stop MySQL from the Terminal using the commands sudo /Library/StartupItems/MySQLCOM/MySQLCOM start You should see something like mysql Ver 14.14 Distrib 5.6.20, for osx10.8 (x86_64) using EditLine wrapper Verify that you can access MySQL command line (note that it's a capital V in the command) mysql -V MySQL is installed to /usr/local/mysqlĪfter installing MySQL, edit the file ~/.bash_profile Easy way to do it from the command line open ~/.bash_profileĪdd this line at the bottom of the file export PATH=/usr/local/mysql/bin:$PATHĬlose the terminal and open it again.
#MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN MAC OS X#
For detailed installation instructions read MySQL's documentation page on Mac OS X installation.
#MAC OS X WEB SERVER SHOWING LOCALHOST INSTEADE OF DOMAIN FOR MAC OS X#
For Mac OS X Lion and above it's the "Mac OS X 10.8 (x86, 64-bit), DMG Archive". Go to MySQL's download page and download the appropriate DMG package. If you don't feel comfortable using the command line stop reading now and download MAMP. You can use Terminal (easy way to get there: type ⌘Space, type Terminal and hit ENTER) or another terminal emulator application such as iTerm2. Warning: Pretty much all of the instructions have to be carried out using the command line. If you have an old machine with an Intel Core Duo you're out of luck. Another major pitfall is that the PHP binaries I am using are only supported on 64-bit Macs. At the time of this writing OS X Yosemite is not released yet so your mileage may vary (read: serious breakage may occur). The instructions below worked for me on Mac OS X Mavericks but should work on Lion and Mountain Lion.

Do try this at home and only at home – or at least not in a production server.

And yes, I did succeed!ĭisclaimer: the configuration I am proposing is only suitable for a local development server. The process on Mac OS X is much more involving that what I had done on Windows last week but I was determined to succeed. I certainly did not want to have to go through the stop servers - change PHP version - start servers routine ever again. I also wanted to no longer have to use MAMP to test my software across different PHP versions. I had to replace it with something nimbler and more convenient. The much touted Z-Ray never really worked for me. Since the last two major versions were becoming a bit of a resource hog. Until now I was using Zend Server as my primary development environment. This makes cross-PHP testing of sites a piece of cake. My goal was to have the same sites run under different versions of PHP by just visiting a different URL on my browser. For those of you who didn't click the link, I decided it would be a cool, geeky project to implement an Apache-MySQL-PHP web server without using a pre-packaged server like MAMP or Zend Server. This week we'll be doing the same thing on Mac OS X.

My last week's blog post on running Apache, MySQL, PHP server on Windows with multiple, simultaneous PHP versions seems to have been a smash hit.
