Home / News

LAMP

 -- L inux -- A pache -- M ySQL -- P HP
The LAMP  development stack is key to understanding the Web.  How nice would it be to have the full stack right on your machine, in the most natively possible form, especially on a macbook (pro) or ultraportable macbook air?

  • Linux.  OS X is Unix based, already 95 percent compatible with the linux world, yet not nearly as susceptible to DSO problems.
  • Apache.  System->Preferences->Sharing->Web Sharing, checkmark the box.  The base url will then be displayed as a link right there in the preferences pane.  Click the link to view your local web server root documents served by default from /LIbrary/Webserver/Documents
  • MySQL.  http://dev.mysql.com/downloads/mysql/  to download an OS X binary that installs just like any other application in OS X.
  • PHP.  Built in, not enabled by default.

To enable PHP in OS X, open the Terminal.app and enter:

 pico /etc/apache2/httpd.conf

then either uncomment or add this ilne

 LoadModule php5_module        libexec/apache2/libphp5.so

Then still in Terminal

 sudo apachectl restart

Then verify php is enabled by creating a 3 line text file named info.php in /Library/Webserver/Documents.

<?php

phpinfo();

?>

Then in Safari or favorite browser, go to http://localhost/info.php

A bunch of php information should display, along with Apache and MySQL info.

Any problems, http://www.entropy.ch is the most solidly knowledgeable and authoritative place to begin troubleshooting.

Mon Tue Wed Thu Fri Sat Sun
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30