![]() ![]() ![]() Now it’s time to continue with setting up Apache and PHP. If you’re coming here through search engine then you probably want to check our previous posts on [intlink id=”how-to-create-a-wordpress-development-environment-on-mac-os-x-snow-leopard” type=”post”]how to install and configure WordPress on Mac OS X Snow Leopard[/intlink]. Fortunately Snow Leopard comes with the latest PHP version (version 5.3.0 at the time of this post) so that’s covered. Please note that PHP is not by default turned on in Snow Leopard. To make sure that you’re configuring everything correctly it’s best to make Web Sharing active (System Preferences » Sharing » Web Sharing). Once that’s done we’re free to go ahead and configure setup PHP and configure Apache. Setting up PHP & MySQL on OS X 10.6 Snow Leopard. With OS X 10.6, Apple ships PHP 5.3 with PEAR, GD and PDO_MYSQL out of the box. Download the 64bit DMG version of MySQL 5.1.x (or 5.5.x) for OS X 10.6 from mysql.com and install the pkg, the startup item and the pref pane. I have a fresh Snow Leopard installation boosted all the way to 10.6.8. I want to use it as a test server with Apache and PHP. That is all I want to do with it! I do not want to install a WAMP-like application on this box! Anyone who is tempted to say, 'Why would you want to do that, just install, WAMP, XAMPP. Accessing the root account is disabled by default in Snow Leopard and the Directory Utility application is not available in the Utilities folder any more. Lets setup PHP first In order to do so copy php.ini.default to php.ini cp /private/etc/php.ini.default /private/etc/php.ini. This way we’ll keep the original php.ini.default just in the right place for any future reference. If you know what you’re doing and need any special stuff then go ahead and modify the php.ini as you feel fit. Configure Apache web server If you have the default Apache installation (and I assume you do) then you find your httpd.conf under /private/etc/apache2/httpd.conf. I expect that you have the technical ability of a software developer familiar with Linux commands. Now edit the httpd.conf file using root access with the sudo command and your favorite text editor. I personally prefer vim if I need to get something done on Terminal but you can also use TextMate or any other text editor. Page 1 of 2 - [How To] Enable QuartzGL and Disable BeamSync on Leopard. When you activate QuartzGL by default, all apps start using QuartzGL. Oct 10, 2008 ps. Don't do this without a backup of the libphp5.so. And it doesn't work on leopard on a G5 with 64 bit architecture. Sudo vim /private/etc/apache2/httpd.conf Enable PHP5 module Search for the PHP module ( /php5. Then it would be good idea to remove the comment from the following line in order to enable PHP to run with Apache: # LoadModule php5_module. The line should look like that after you’re done: LoadModule php5_module. Enable mod_rewrite for permalinks If you like beautiful URLs (permalinks) then make sure that you have mod_rewrite Apache module enabled. It should look something like that in your httpd.conf: LoadModule rewrite_module libexec/apache2/mod_rewrite.so Change the user Apache runs as I prefer not to use Mac OS X Snow Leopards default location for sites (the Sites folder in your Home folder).
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
March 2018
Categories |