1. Go to "/etc/apache2"
2. Use either of the options:
2.a. If using Finder: Give yourself access privileges (read-write access) to file "httpd.conf" and open the file using your favourite text editor
2.b. If using Terminal: Using your favourite text editor (vi, pico etc), using sudo open the "httpd.conf" file.
3. Uncomment (remove the #) in front of line:
LoadModule php5_module libexec/apache2/libphp5.so4. Add the following lines (preferably at the end of the document so that it is easier to debug later if required):#IfModule php5_module$
AddType application/x-httpd-php .phpIn the above, replace # with an "<" and the $ with an ">"
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.html index.php
</IfModule>
</IfModule>
5. Try by running a test php page.
<?php phpinfo(); ?>
In the above, replace # with an "<" and the $ with an ">"
No comments:
Post a Comment