<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Michel Hiemstra - Web Development &#38; Internet Marketing &#187; lamp</title>
	<atom:link href="http://www.michelhiemstra.nl/blog/tag/lamp/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.michelhiemstra.nl/blog</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Wed, 30 Mar 2011 14:59:03 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Installing Apache, PHP (with xdebug) and MySQL on Mac OS X Leopard</title>
		<link>http://www.michelhiemstra.nl/blog/installing-apache-php-with-xdebug-and-mysql-on-mac-os-x-leopard/</link>
		<comments>http://www.michelhiemstra.nl/blog/installing-apache-php-with-xdebug-and-mysql-on-mac-os-x-leopard/#comments</comments>
		<pubDate>Wed, 19 Aug 2009 14:03:44 +0000</pubDate>
		<dc:creator>Michel Hiemstra</dc:creator>
				<category><![CDATA[How-To]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[lamp]]></category>
		<category><![CDATA[leopard]]></category>
		<category><![CDATA[mac]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[osx]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[xdebug]]></category>

		<guid isPermaLink="false">http://www.michelhiemstra.nl/blog/?p=55</guid>
		<description><![CDATA[Actually, this is very easy to do, since Apache and PHP are already installed we only have to enable PHP, install MySQL and install xdebug.
Some people like to install other software like MAMP or XAMPP but i like to do it without installing other software other than Mac OS X shipped with, well of course <a href="http://www.michelhiemstra.nl/blog/installing-apache-php-with-xdebug-and-mysql-on-mac-os-x-leopard/" class="more-link">More &#62;</a>]]></description>
			<content:encoded><![CDATA[<p>Actually, this is very easy to do, since Apache and PHP are already installed we only have to enable PHP, install MySQL and install xdebug.</p>
<p>Some people like to install other software like <a title="MAMP" href="http://www.mamp.info/en/index.html" target="_blank">MAMP</a> or <a title="XAMPP" href="http://www.apachefriends.org/en/xampp-macosx.html" target="_blank">XAMPP</a> but i like to do it without installing other software other than Mac OS X shipped with, well of course we need to install some things but no all-in-one packages.</p>
<p><span id="more-55"></span></p>
<p>You may want to install the Developer Tools (xcode), you can find these on your Leopard DVD, or install the <a title="Apple Developer Tools" href="http://developer.apple.com/tools/" target="_blank">developertools</a> from the apple site. These are required if we are going to compile extensions for PHP.</p>
<p>Lets start with enabling PHP, open up Terminal, and type: <code>sudo nanoÂ /etc/apache2/httpd.conf</code> and type in your password. Find the line that loads the php5 module:</p>
<p><code>#LoadModule php5_module        libexec/apache2/libphp5.so</code></p>
<p>And remove the # before <code>LoadModule</code>.</p>
<p>Save the file (<code>ctrl+x</code>) and restart Apache, you can do this in System Pref&#8217;s by unchecking the Web Sharing service (Sys prefs &gt; Sharing), or you can type it in Terminal: <code>sudo apachectl restart</code></p>
<p>Lets install MySQL, i dont exactly know why apple did not ship this too, but fortunately MySQL made a nice prefpane for this. Download the package (dmg) at the <a title="MySQL Leopard" href="http://dev.mysql.com/downloads/mysql/5.0.html#macosx-dmg" target="_self">MySQL website</a> Install it, and start it in your pref pane (Sys prefs &gt; MySQL)</p>
<p>Only thing we have to do now, is connecting MySQL with PHP, type in Terminal: <code>sudo nanoÂ /etc/my.cnf</code> and insert:</p>
<p><code>[client]<br />
socket = /var/mysql/mysql.sock<br />
[mysqld]<br />
socket = /var/mysql/mysql.sock</code></p>
<p>and then:</p>
<p><code>sudo mkdir /var/mysql<br />
sudo chown _mysql /var/mysql</code></p>
<p>All done, you now have Apache with PHP and MySQL, optionally we can install xdebug, there are a lot of known problems when doing this, so here&#8217;s what worked for me instantly:</p>
<p>Download the <a title="Komodo Remote Debugging" href="http://aspn.activestate.com/ASPN/Downloads/Komodo/RemoteDebugging" target="_blank">Komodo Remote Debugging</a> package and extract the xdebug.so from the 5.2 directory, and move it toÂ /usr/libexec/xdebug.so</p>
<p>Now open your php.ini file atÂ <code>/private/etc/apache2/php.ini</code> and add this line:</p>
<p><code>[xdebug]<br />
zend_extension=/usr/libexec/xdebug.so</code></p>
<p>Now, restart apache again with sudo apachectl restart, and you should have xdebug installed!<br />
If not, or you come up with some errors, please comment and ill try to help.</p>
<p>Optionally, if you want to make local development a little bit easier you can follow my other tutorial: <a href="http://www.michelhiemstra.nl/blog/making-local-development-a-little-bit-easier-on-mac-os-x-leopard/" target="_self">Making local development a little bit easier</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.michelhiemstra.nl/blog/installing-apache-php-with-xdebug-and-mysql-on-mac-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

