- Open the terminal
- Type "cd /etc/apache2"
- Change permission on httpd.conf by typing "sudo chmod 755 httpd.conf"
- Open httpd.conf
- Search for "#LoadModule php5_module libexec/apache2/libphp5.so" (line 117)
- Uncomment the line by removing "#"
- To start the server type "sudo apachectl start"
- To stop your server type "sudo apachectl stop"
- Your files should be saved in "/Library/WebServer/Documents/ "
- On your browser, type "localhost"
- You should see "It works!"
Testing your server
- Create a file call "test.php"
- Copy/Type this in
- Save it in "/Library/WebServer/Documents/
- Open your browser and type "localhost/test.php"
- You should see "Please work"
Source:
- http://www.editrocket.com/articles/php_mac_os_x.html
- http://www.cyberciti.biz/faq/restarting-apache-under-oxs-commandline/
0 comments:
Post a Comment