{"id":44,"date":"2007-10-28T11:19:47","date_gmt":"2007-10-28T19:19:47","guid":{"rendered":"http:\/\/fernyb.net\/blog\/2007\/10\/28\/how-to-get-php-working-on-mac-os-x-105-leopard\/"},"modified":"2007-10-28T11:19:47","modified_gmt":"2007-10-28T19:19:47","slug":"how-to-get-php-working-on-mac-os-x-105-leopard","status":"publish","type":"post","link":"http:\/\/fernyb.net\/blog\/2007\/10\/28\/how-to-get-php-working-on-mac-os-x-105-leopard\/","title":{"rendered":"How to: Get PHP working on Mac OS X 10.5 Leopard"},"content":{"rendered":"<p><img decoding=\"async\" title=\"PHP Mac OS X 10.5\" alt=\"PHP Mac OS X 10.5\" src=\"http:\/\/fernyb.net\/images\/macosx105php.png\" \/><\/p>\n<p>After updated my mac to the latest version of mac leopard my php installation broke, I guess because Leopard installed Apache2 and I was using Apache1.3 which was what OSX 10.4 came with. So to get PHP5 working with Mac OS X 10.5 Leopard. Do the following:<\/p>\n<p>1. Launch the Terminal its located in applications\/utilities<\/p>\n<p>2. In Terminal type: cd \/private\/etc\/apache2<\/p>\n<p>3. Once your in the directory &#8220;\/private\/etc\/apache2&#8221;, using what ever text editor you like open the file named httpd.conf (if your using textmate text editor, you can do, mate .\/httpd.conf)<\/p>\n<p>4. Once you open the httpd.conf file now look for the following line:<br \/>\n&#8220;#LoadModule php5_module        libexec\/apache2\/libphp5.so&#8221; Once you find it, it&#8217;s somewhere around line number 114, uncomment the line So it should look something like this:<\/p>\n<p>LoadModule php5_module        libexec\/apache2\/libphp5.so<\/p>\n<p>5. After doing all that now back in terminal type this command: cd \/private\/etc\/apache2\/users<\/p>\n<p>6. Once in that directory open the file with your account username (ex. my file would be named, FernyB.conf)<\/p>\n<p>7. Delete all contents inside the file<\/p>\n<p>8. Start the web server or restart it by going into System Preferences > Web Sharing<\/p>\n<p>9. In Terminal type: open \/Library\/WebServer\/Documents (that should open up finder in that location)<\/p>\n<p>10. Now Create a file called phpinfo.php and place it in \/Library\/WebServer\/Documents<\/p>\n<p>11. Open up phpinfo.php and type the following into phpinfo.php<br \/>\n<img decoding=\"async\" alt=\"PHP Info\" title=\"PHP Info\" src=\"http:\/\/fernyb.net\/images\/phpinfo.png\" \/><br \/>\n12. Save and close phpinfo.php13. Now with your favorite web browser safari go to http:\/\/127.0.0.1\/phpinfo.php<\/p>\n<p>14. Now you should see the PHP Information page<\/p>\n<p>15. The php.ini file will be located in \/etc<\/p>\n<p>16. In the directory \/etc you will need to rename or copy and rename the file php.ini.default<\/p>\n<p>17. In the directory \/etc should have a file named php.ini<\/p>\n<p>18. Now restart the web server, System Preferences > Web Sharing<\/p>\n<p>19. That&#8217;s all.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>After updated my mac to the latest version of mac leopard my php installation broke, I guess because Leopard installed Apache2 and I was using Apache1.3 which was what OSX 10.4 came with. So to get PHP5 working with Mac OS X 10.5 Leopard. Do the following: 1. Launch the Terminal its located in applications\/utilities [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[7,2,1],"tags":[],"_links":{"self":[{"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/posts\/44"}],"collection":[{"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":0,"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/fernyb.net\/blog\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}