Mac users accept the selection of either a binary or a source installation. In fact, your OS X likely came alongside Apache as well as PHP preinstalled. This is probable to hold out quite an one-time build, as well as it likely lacks many of the less mutual extensions.
However, if all you lot desire is a quick Apache + PHP + MySQL/PostgreSQL setup on your laptop, this is sure enough the easiest agency to fly. All you lot ask to produce is edit your Apache configuration file as well as plow on the Web server.
So simply follow the steps given below:
- Open the Apache config file inwards a text editor equally root.
sudo opened upwards -a TextEdit /etc/httpd/httpd.conf
- Edit the file. Uncomment the next lines:
Load Module php5_moduleAddModule mod_php5.cAddType application/x-httpd-php .php
- You may besides desire to uncomment the <Directory /home/*/Sites> block or otherwise say Apache which directory to serve out of.
- Restart the Web server
sudo apachectl graceful
- Open a text editor. Type: <?php phpinfo(); ?>. Save this file inwards your Web server's document root equally info.php.
- Start whatever Web browser as well as browse the file.you must ever role an HTTP asking (http://www.testdomain.com/info.php or http://localhost/info.php or http://127.0.0.1/info.php) rather than a filename (/home/httpd/info.php) for the file to hold out parsed correctly
You should meet a long tabular array of information nigh your novel PHP installation message Congratulations!
0 komentar:
Please comment if there are any that need to be asked.