
- #Mysql os x server 10.8 how to#
- #Mysql os x server 10.8 mac os x#
- #Mysql os x server 10.8 install#
- #Mysql os x server 10.8 code#
Extract the libmcrypt and PHP source code into ~/Desktop/src. #Mysql os x server 10.8 install#
Install Xcode from the Mac App Store and then install the command line tools from within Xcode. At the time of writing you need version 5.3.13. Download the correct PHP source code from here. Download libmcrypt-2.5.8 from sourceforge. Read the comments though for the 10.8 changes required. #Mysql os x server 10.8 mac os x#
This is useful! Follow the details in Plugging mcrypt into PHP, on Mac OS X Lion 10.7 by Michale Gracie.
Restart apache: sudo apachectl restart and check in the phpinfo that OAuth is now loaded. Edit /etc/php.ini add these lines to the end of the file:Įxtension="/usr/lib/php/extensions/no-debug-non-zts-20090626/oauth.so". Remove the pcre folder on your desktop as you don’t need it any more. Download the latest PCRE source code from and unzip to a folder on your desktop. Ensure you have installed Xcode from the Mac App Store. Edit /etc/php.ini and find the line: include_path = ".:/php/includes" and change it to:Ī couple of projects I work on use the PECL OAuth component:. We need PEAR! For some reason, it’s not set up ready to on Lion, but the install phar file is here, so we just need to run it. Restart apache: sudo apachectl restart and check in the phpinfo that xdebug is now loaded. If you want to configure your xdebug settings, then scroll to the end of the file and look for the section. zend_extension="/usr/lib/php/extensions/no-debug-non-zts-20090626/xdebug.so" (I like to see my xdebug errors in bright orange!)Īlso, change all instances of /var/mysql/mysql.sock to /tmp/mysql.sockĬan’t have a PHP development environment without xdebug! Apple appears to agree as Mountain Lion ships with it. sudo vim php.ini (or edit with BBEdit/TextWrangler) and change settings appropriately.Įxtension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20090626". Sudo launchctl load -w /System/Library/LaunchDaemons/ Ensure that Apache will start after a reboot:. Use Safari to navigate to and check that the PHP version is displayed (5.3.13 at the time of writing). Create a new file called info.php with (note that it will ask for your password as the Documents folder is only writable by root.
Create a new folder called “orig” and place all files currently in the Documents folder into it.Open Finder and navigate to /Library/WebServer/Documents/ using shift+cmd+g.Change permissions back: sudo chmod u-w nf.Find AllowOverride None within the section and change to AllowOverride All so that.Find #LoadModule php5_module libexec/apache2/libphp5.so and remove the leading #.sudo vim nf (or use BBEdit/TextWrangler to edit nf).
Give write permission the config file to root: sudo chmod u+w nf.We just have to use the command line now to start and stop it. sudo ln -s /tmp/mysql.sock /var/mysql/mysql.sockĪpple have removed the “Web Sharing” feature from System Preferences, but Apache is still installed.Now ensure that the mysql.sock file can be found by PHP:.Mysqladmin -u root password isn’t in plain text on the disk. (Note that we set EDITOR whilst we are here so that svn is happy!) Add /usr/local/mysql/bin to the path: vim ~/.bash_profile and add:Įxport PATH=~/bin:/usr/local/bin:/usr/local/mysql/bin:$PATHĪt top of file.Download the “x86, 64bit” DMG version of MySQL 5.5.x for OS X 10.6 from and install the pkg, the startup item and the pref pane.usr/localĮnsure that the following directories exist:
#Mysql os x server 10.8 how to#
This is how to set it up from a clean install of 10.8. With OS X 10.8, Apple continues to ship PHP 5.3 with Xdebug, PEAR, GD and PDO_MYSQL. There is a Serbo-Croatian translation of this article kindly provided by Anja Skrba: Podešavanje PHP i MySQL na OS X 10.8