Monday Mar 24, 2008

AMP developement on the Mac

If you want to do any AMP development on your Mac and have Leopard you'll be pleasantly surprised by the out of the box experience.

First of all you the system comes bundled with Apache 2.0 and PHP 5.2.5. To configure the stack is quite simple:

  • "Turn on" Apache - go to System Preferences | Sharing | Web Sharing and check this option
  • Test the installation the web server installation http://127.0.0.1/
  • Find the main configuration file of the Apache web server /private/etc/apache2/httpd.conf
  • Enable PHP - edit httpd.conf (remember to use sudo) and uncomment this line:
    • #LoadModule php5_module        libexec/apache2/libphp5.so
  • Test again by creating some file in the document root: /Library/WebServer/Documents and add the following code snippet
    • <?php phpinfo(); ?>
    • bring up the browser again and invoke the test file (http://127.0.0.1/somefilethatyoucreated.html - you should see a table that gives you the details of the php version that you are running
About

octav

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
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
   
       
Today