<?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>Devvyn.com &#187; web development</title>
	<atom:link href="http://www.devvyn.com/category/web-development/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.devvyn.com</link>
	<description>Website of a Lazy Perfectionist</description>
	<lastBuildDate>Sun, 15 Nov 2009 08:25:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>PHP came with Mac OS X 10.5?</title>
		<link>http://www.devvyn.com/2009/04/12/php-on-my-mac/</link>
		<comments>http://www.devvyn.com/2009/04/12/php-on-my-mac/#comments</comments>
		<pubDate>Mon, 13 Apr 2009 03:08:17 +0000</pubDate>
		<dc:creator>devvyn</dc:creator>
				<category><![CDATA[hacking]]></category>
		<category><![CDATA[web development]]></category>

		<guid isPermaLink="false">http://www.devvyn.com/?p=26</guid>
		<description><![CDATA[I set up PHP on my Mac so Web Sharing in Mac OS X can act as a test server for the PHP includes going up on my client's site.  I had to troubleshoot for a while, first.]]></description>
			<content:encoded><![CDATA[<p>Apparently Mac OS X 10.5 comes with the PHP module installed on the Apache web server.  The &#8220;Web Sharing&#8221; option in System Preference actually switches on a <a title="Apache Web Serving With Mac OS X - O'Reilly Media" href="http://www.onlamp.com/pub/a/mac/2001/12/07/apache.html" target="_blank">pre-installed, full-fledged web server</a>.  I&#8217;ve known about the web server for a while, but it&#8217;s pretty cool that I didn&#8217;t have to install the PHP module.</p>
<p>What this is all about is I wanted to use PHP to do server side includes so I didn&#8217;t have to update as many files when I make changes to my client&#8217;s sites, but I wanted to preview the pages while I worked on them.  The best solution was to preview the files through the Sites folder on my Mac by steering my browser to http://127.0.0.1/.  The Mac is now my test server!</p>
<p>It wasn&#8217;t working at first, though.  I had to look up some <a title="Enabling PHP in Mac OS" href="http://foundationphp.com/tutorials/php_leopard.php" target="_blank">tutorials on the subject</a> to find out how to edit the appropriate configuration files.  I went one step further and installed <a title="Webmin (Mac OS X)" href="http://www.webmin.com/osx.html" target="_blank">Webmin</a> so I can spend less time manually editing configuration, which are annoying because they&#8217;re hidden files in hidden folders so unless I want to force Finder to <a title=" Show Hidden Files -  Mac Tips and Tricks" href="http://www.mactricksandtips.com/2008/04/show-hidden-files.html" target="_blank">show hidden files</a>, I have to use Terminal to <a title="Mac OS X Manual Page for Open(1)" href="http://developer.apple.com/documentation/Darwin/Reference/Manpages/man1/open.1.html" target="_blank">open</a> the file.</p>
<p>On top of all that work I had somehow broken my web sharing without realizing it.  I did a port scan and found <a title="Privoxy Home Page" href="http://www.privoxy.org/">Privoxy</a> answering port 80 instead of apached.  For the life of me I don&#8217;t know how that got there.  Once that was gone, port 80 was closed even though System Preferences showed it still open.  I checked console logs and discovered that somehow I&#8217;d lost the directory apached was trying to save log files to.  I also had no configuration file (there used to be a default one) for my user account.</p>
<p>When all was said and done I got it working and the whole experience has given me a better idea of how web servers work.  It was actually kind of fun.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.devvyn.com/2009/04/12/php-on-my-mac/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
