<?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>evardsson.com: stuff that w0rks &#187; Apache</title>
	<atom:link href="http://www.evardsson.com/blog/tag/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.evardsson.com/blog</link>
	<description>tweaks and hacks, php, python, music, home and ???</description>
	<lastBuildDate>Thu, 29 Jul 2010 19:25:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Apache and PHP HTTP PUT Voodoo</title>
		<link>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/</link>
		<comments>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 23:08:42 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[REST]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/?p=399</guid>
		<description><![CDATA[While trying to work out the details for a PHP REST utility I kept running into a wall when it came to using HTTP PUT (and HTTP DELETE) with Apache 2.2 and PHP 5. There are plenty of scattered tidbits of information relating to this on forums about the web, many old, and many more [...]]]></description>
			<content:encoded><![CDATA[<p>While trying to work out the details for a PHP REST utility I kept running into a wall when it came to using HTTP PUT (and HTTP DELETE) with Apache 2.2 and PHP 5. There are plenty of scattered tidbits of information relating to this on forums about the web, many old, and many more incomplete or even unhelpful. [As a side note: if someone on a forum you frequent is asking for help with getting HTTP PUT to work in Apache, telling them "Don't use PUT it lets the hax0rs put files on your server! N00b! Use POST LOL!!11!" is not helping, nor does it make you look intelligent.]</p>
<p>The first hint I came across was putting <code>Script PUT put.php</code> in your httpd.conf in the &lt;Directory&gt; section. (That is, of course, assuming that your script for handling PUT requests is called put.php.)</p>
<p>I tried that and on restarting Apache got the error &#8220;Invalid command &#8216;Script&#8217;, perhaps misspelled or defined by a module not included in the server configuration&#8221; &#8211; which lead to a short bit of research (thanks Google!) that pointed out that the Script directive requires mod_actions be enabled in Apache. I did that and then tried to hit my script with a PUT request, to which I got a 405 error: &#8220;The requested method PUT is not allowed for the URL /test/put.php&#8221;.</p>
<p>Well, that was certainly strange, so I added &lt;Limit&gt; and &lt;LimitExcept&gt; blocks to my &lt;Directory&gt; section, but to no avail. So I changed the &lt;Directory&gt; directive from &lt;Directory /var/www/test&gt; to &lt;Directory /var/www/test/put.php&gt;. It looked strange, but what the heck, worth a try. I could now do PUT requests, but only as long as the url was /test/put.php, and that is not what is wanted when putting together a RESTful application. Trying to do anything useful, like a PUT to /test/put.php/users/ resulted in more 405 errors, now saying &#8220;The requested method PUT is not allowed for the URL /test/put.php/users/&#8221;.</p>
<p>So, back to the httpd.conf to change the &lt;Directory&gt; back to the previous. And then on to the other method I saw in a few places, using mod_rewrite to forward PUT (and DELETE) requests to the script. Of course, everywhere I saw this listed it was claimed that this alone (without the Script directive) was enough to enable PUT. So, I commented out the Script directive and added some mod_rewrite statements to the .htaccess file (which is always preferable in development as you can make changes on the fly without reloading or restarting the server.) So I added a <code>RewriteCond %{REQUEST_METHOD} (PUT|DELETE)</code> and a <code>RewriteRule .* put.php</code>.</p>
<p>And, I went back to test it again and, big surprise, got a 405 error again. Now, even when pointing directly at /test/put.php I got a 405 error. So, I decided to try combining the two. I uncommented the lines in the httpd.conf and bumped the server and was pleasantly surprised that PUT (and DELETE) requests to the /test/ directory were properly handled by the script. Now I could do something useful, like add another mod_rewrite rule to send all traffic for /api/ to the /test/put.php and call /api/users/ with a PUT (or DELETE) request and it was properly handled!</p>
<p>So, putting it all together:</p>
<p>In Apache: enable mod_actions and mod_rewrite. In Gentoo: make sure the lines</p>
<pre>LoadModule actions_module modules/mod_actions.so</pre>
<p>and</p>
<pre>LoadModule rewrite_module modules/mod_rewrite.so</pre>
<p>in httpd.conf are not commented out. In Debian the commands</p>
<pre>a2enmod actions</pre>
<p>and</p>
<pre>a2enmod rewrite</pre>
<p>do the trick.</p>
<p>In the httpd.conf add the following:</p>
<pre>&lt;Directory /var/www/test&gt;
    &lt;Limit GET POST PUT DELETE HEAD OPTIONS&gt;
        Order allow,deny
        # You might want something a little more secure here, this is a dev setup
        Allow from all
    &lt;/Limit&gt;
    &lt;LimitExcept GET POST PUT DELETE HEAD OPTIONS&gt;
        Order deny,allow
        Deny from all
    &lt;/LimitExcept&gt;
    Script PUT /var/www/test/put.php
    Script DELETE /var/www/test/put.php
&lt;/Directory&gt;
</pre>
<p>And finally, in the .htaccess add the rewrite voodoo:</p>
<pre>RewriteEngine On
RewriteBase /test
RewriteRule ^/?(api)/? put.php [NC]
RewriteCond %{REQUEST_METHOD} (PUT|DELETE)
RewriteRule .* put.php
</pre>
<p>Hopefully this works as well for you as it did for me. Now to get back to business of actually writing the code to deal with the request and dispatch it appropriately (which may be a post for another day, or you can have a look at how <a href="http://www.gen-x-design.com/archives/create-a-rest-api-with-php/">some</a> <a href="http://www.fliquidstudios.com/2009/01/13/introduction-to-writing-a-rest-server-in-php/">others</a> have done it.)</p>
<p>By the way, for testing I have found the Firefox plugin <a href="https://addons.mozilla.org/en-US/firefox/addon/2691">Poster</a> to be immensely useful, as well as the Java based <a href="http://code.google.com/p/rest-client/">RESTClient</a>.</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Apache+and+PHP+HTTP+PUT+Voodoo+http://iaoi4.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;submitHeadline=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;submitHeadline=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo&amp;link=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo&amp;link=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/&amp;title=Apache+and+PHP+HTTP+PUT+Voodoo" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2010/04/27/apache-and-php-http-put-voodoo/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Gentoo Apache 2.2 update and 403 errors</title>
		<link>http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/</link>
		<comments>http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/#comments</comments>
		<pubDate>Sun, 23 Sep 2007 01:50:31 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Gentoo]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/</guid>
		<description><![CDATA[After upgrading my entire system, moving from Apache 2.0.x to 2.2.6 I ran into an interesting problem (actually, a couple.) Some of the configurations have moved, and things that used to be in the Gentoo dist httpd.conf have been broken out into config files in the /etc/apache2/modules.d/ directory. So, copying my old vhosts file in [...]]]></description>
			<content:encoded><![CDATA[<p>After upgrading my entire system, moving from Apache 2.0.x to 2.2.6 I ran into an interesting problem (actually, a couple.) Some of the configurations have moved, and things that used to be in the Gentoo dist httpd.conf have been broken out into config files in the /etc/apache2/modules.d/ directory. So, copying my old vhosts file in was not a good idea. And doing a merge of the old and new httpd.conf files was also a mistake. Once I figured out that I had the Listen 80 directive in one file and Listen 192.168.1.10:80 in another I understood why it failed to start. So, I fixed all the configs to match the new setup, and tried again. It started up just fine, and seemed okay, until I tried to connect. I kept getting 403 errors.</p>
<p>I went through the standard checks, checking the file permissions, .htaccess settings, and so on, to no avail. A quick Google search pointed me to the <a href="http://victortrac.com/gentoo_upgrade_to_apache2-2">fix from Victor Trac</a>. He found the offending bit in the new broken out config in /etc/apache2/modules.d/00_default_settings.conf where it contains:</p>
<pre>&lt;Directory /&gt;</pre>
<pre>        Options FollowSymLinks
        AllowOverride None
<strong>        Order deny,allow</strong>
<strong>        Deny from all</strong>
&lt;/Directory&gt;</pre>
<p>The fix is either to change that to Allow from all and define Deny where needed in each virtual host or to override it in every virtual host. Since I tend to set up my hosts with the idea that the server allows everything and it is up to the host to deny where needed I chose the first option, reloaded Apache and everything is sweet again.</p>
<p><span style="display: block; background-color: yellow">Edit:</span></p>
<p>I found I was having an error with the RewriteRules after switching from Apache 2.0.x to 2.2.x &#8211; I found the fix on the Gentoo forums, which required adding an extra RewriteCond line in the .htaccess file.</p>
<p>The old .htaccess: and the new:</p>
<pre># BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blog/index.php [L]
&lt;/IfModule&gt;
# END WordPress</pre>
<p>and the new:</p>
<pre># BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /blog
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
<strong>RewriteCond $1 !&#92;.php$</strong>
RewriteRule . /blog/index.php [L]
&lt;/IfModule&gt;
# END WordPress</pre>
<p>Technorati Tags: <a href="http://technorati.com/tag/Apache%202.2" class="performancingtags" rel="tag">Apache 2.2</a>, <a href="http://technorati.com/tag/403" class="performancingtags" rel="tag">403</a>, <a href="http://technorati.com/tag/Gentoo" class="performancingtags" rel="tag">Gentoo</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Gentoo+Apache+2.2+update+and+403+errors+http://igntz.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;submitHeadline=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;submitHeadline=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Gentoo+Apache+2.2+update+and+403+errors&amp;link=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Gentoo+Apache+2.2+update+and+403+errors&amp;link=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/&amp;title=Gentoo+Apache+2.2+update+and+403+errors" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2007/09/22/gentoo-apache-22-update-and-403-errors/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Apache 2.2.6, PHP 5.2.4 and MySQL 5.0.45 on OS X</title>
		<link>http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/</link>
		<comments>http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/#comments</comments>
		<pubDate>Tue, 18 Sep 2007 02:53:32 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/</guid>
		<description><![CDATA[I got tired of looking for a way to replace the Apache/PHP that Apple packages with OS X (without breaking anything else in the process) so I decided to install Apache 2.2 and PHP5 in their own location to avoid stepping on the Apple package toes. Since I do a great deal of development again [...]]]></description>
			<content:encoded><![CDATA[<p>I got tired of looking for a way to replace the Apache/PHP that Apple packages with OS X (without breaking anything else in the process) so I decided to install Apache 2.2 and PHP5 in their own location to avoid stepping on the Apple package toes.</p>
<p>Since I do a great deal of development again MySQL I needed to install that as well, and figured that I would probably need the GD functionality as well so I grabbed libjpeg and libpng to make those work as well. This is the step-by-step.</p>
<p>(Props to James Pelow and his <a href="http://www.phpmac.com/articles.php?view=252">article from last year</a>, from which I borrowed the configure command lines and configuration modifications, as well as the idea of installing the whole mess in /apache2.)</p>
<p>Download the latest MySQL (I used the package version) from <a href="http://dev.mysql.com/downloads/">MySQL</a>.</p>
<p>Installation is straightforward following the same methods as any other Mac installer.</p>
<p>Download and install libjpeg and libpng &#8211; from <a href="http://ethan.tira-thompson.com/Mac%20OS%20X%20Ports.html">Ethan Tira-Thompson</a> (this is also in a Mac installer which contains both libraries in one installer).</p>
<p>Download the latest Apache httpd server (Unix source) from <a href="http://httpd.apache.org/download.cgi">Apache</a></p>
<p>in the terminal:</p>
<pre>
tar -xzvf httpd-2.2.6.tar.gz &amp;&amp; cd httpd-2.2.6

./configure

--prefix=/apache2

--enable-module=most

--enable-shared=max

make

sudo make install

sudo mkdir /apache2/php</pre>
<p>Download the latest PHP from <a href="http://www.php.net/downloads.php">PHP</a></p>
<pre>
tar -xzvf php-5.2.4.tar.gz &amp;&amp; cd php-5.2.4

./configure

--prefix=/apache2/php

--with-zlib

--with-xml

--with-ldap=/usr

--enable-cli

--with-zlib-dir=/usr

--enable-exif

--enable-ftp

--enable-mbstring

--enable-mbregex

--enable-dbx

--enable-sockets

--with-iodbc=/usr

--with-curl=/usr

--with-mysql=/usr/local/mysql

--with-gd

--with-jpeg-dir=/usr/local

--with-png-dir=/usr/local</pre>
<pre>--with-apxs2=/apache2/bin/apxsmake

sudo make install

sudo cp php.ini-dist /apache2/php/lib/php.ini</pre>
<p>Now to make your Apache2.2 a little more &#8216;Mac&#8217; &#8211; you can point it at the Mac web shared files folder, change the user and group and change the location for user files to match the Mac folder system.</p>
<p>Edit httpd.conf (I use nano, you can use any flat text editor like nano, pico, vi, emacs or even BBedit)</p>
<pre>sudo nano -w /apache2/conf/httpd.conf</pre>
<p>The changes to httpd.conf I made:<br />
I changed</p>
<pre>User daemon</pre>
<pre>Group daemon</pre>
<p>to</p>
<pre>User www</pre>
<pre>Group www</pre>
<p>and</p>
<pre>DocumentRoot "/apache2/htdocs"</pre>
<p>to</p>
<pre>DocumentRoot "/Library/WebServer/Documents"</pre>
<p>and</p>
<pre>&lt;Directory "/apache2/htdocs"&gt;</pre>
<p>to</p>
<pre>&lt;Directory "/Library/WebServer/Documents"&gt;</pre>
<p>and added</p>
<pre>AddType application/x-httpd-php .php</pre>
<pre>AddType application/x-httpd-php-source .phps

DirectoryIndex index.html index.php</pre>
<p>Edit httpd-userdir.conf</p>
<pre>sudo nano -w /apache2/conf/extra/httpd-userdir.conf</pre>
<p>The changes to httpd-userdir.conf I made:<br />
I changed</p>
<pre>UserDir public_html</pre>
<p>to</p>
<pre>UserDir Sites</pre>
<p>To start and stop the server:<br />
MySQL comes with a Preference Pane that allows you to start and stop it there. To start and stop Apache you need to first make sure that the default Apache shipped with OS X is stopped.</p>
<pre>sudo /apache2/bin/apachectl start</pre>
<pre>sudo /apache2/bin/apachectl stop</pre>
<p>I only ran into one issue, when trying to start the server I ran against the following error message (and no running server, of course):</p>
<pre>httpd: Syntax error on line 53 of /apache2/conf/httpd.conf:</pre>
<pre>Cannot load /apache2/modules/libphp5.so into server:</pre>
<pre>Library not loaded: /usr/local/mysql/lib/mysql/libmysqlclient.15.dylib</pre>
<pre>Referenced from: /apache2/modules/libphp5.son  Reason: image not found</pre>
<p>To fix this I did the following:</p>
<pre>cd /usr/local/mysql/lib</pre>
<pre>sudo mkdir /usr/local/mysql/lib/mysql

for i in `ls ./l*`; do sudo ln -sf /usr/local/mysql/lib/$i /usr/local/mysql/lib/mysql/$i; done</pre>
<p>This creates soft links in the directory that libphp5.so is looking for the MySQL libraries.</p>
<p>Then it started right up! Wheee! (I did a quick test by dropping PhpMyAdmin into the /Library/WebServer/Documents folder and browsed to it &#8211; the whole Apache/PHP/MySQL is working correctly)</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Apache%202.2" class="performancingtags" rel="tag">Apache 2.2</a>, <a href="http://technorati.com/tag/PHP5" class="performancingtags" rel="tag">PHP5</a>, <a href="http://technorati.com/tag/MySQL%205" class="performancingtags" rel="tag">MySQL 5</a>, <a href="http://technorati.com/tag/OS%20X" class="performancingtags" rel="tag">OS X</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X+http://36h4q.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;submitHeadline=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;submitHeadline=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X&amp;link=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X&amp;link=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/&amp;title=Apache+2.2.6%2C+PHP+5.2.4+and+MySQL+5.0.45+on+OS+X" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2007/09/17/apache-226-php-524-and-mysql-5045-on-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Useful custom 403 and 404 error pages with PHP</title>
		<link>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/</link>
		<comments>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/#comments</comments>
		<pubDate>Mon, 11 Jun 2007 21:26:55 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/</guid>
		<description><![CDATA[While this is certainly nothing new, it seems to be too often overlooked. Apache allows an ErrorDocument Directive in the configuration that will point at a custom document. Using this can have some benefits to the user and to the site administrator. While Apache allows for error documents located at a remote URL (ie anything [...]]]></description>
			<content:encoded><![CDATA[<p>While this is certainly nothing new, it seems to be too often overlooked. Apache allows an <a href="http://httpd.apache.org/docs/2.0/mod/core.html#errordocument">ErrorDocument Directive</a> in the configuration that will point at a  custom document. Using this can have some benefits to the user and to the site administrator.</p>
<p>While Apache allows for error documents located at a remote URL (ie anything starting with http://) this causes Apache to send a redirect to the browser, even if the document resides on the same server. This is not a good idea, as the documentation points out.</p>
<blockquote><p>This has several    implications, the most important being that the client will not receive the original error status code, but instead will receive a redirect status code. This in turn can confuse web robots and other clients which try to determine if a URL is valid using the status code. In addition, if you use a remote    URL in an <code>ErrorDocument 401</code>, the client will not know to prompt the user for a password since it will not receive the 401 status code. Therefore, <strong>if you use an  <code>ErrorDocument 401</code> directive then it must refer to a local document.</strong></p></blockquote>
<p>Using a local document for handling errors, however, gives you the ability to override the default Apache messages, which are often replaced by the browser with their own, internal error messages (<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;Q294807">MSIE, I&#8217;m talking about you</a>.) Besides giving you the ability to match the error page to your site, you can use some simple PHP to make it more informative for both the end user and the site admin. Instead of just saying &#8220;File so-and-so doesn&#8217;t exist, sorry&#8221; you can make a page that allows the user to send a message to the admin. If you wish, you can have the page automatically mail the information, although that can quickly lead to <em>hundreds</em> of emails as users mis-type urls, spiders follow old links, and scripts search your LAMP site for IIS vulnerabilities. Trust me on that one, it&#8217;s a bad idea that won&#8217;t outlive the weekend.</p>
<p>With that in mind here a couple samples that you can build from.</p>
<p>Sample 403 error page:</p>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c5298b8a6684">
<div class="synthi_header" style="font-weight:bold;"> PHP <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c5298b8a6684').style.display='block';document.getElementById('plain_synthi_4c5298b8a6684').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
<?php
print &#034;<html>
<head>

</head>
<body>&#034;
$server = $_SERVER[‘SERVER_NAME’];
$uri = $_SERVER[‘REQUEST_URI’];
$bad_link = $server.$uri;
// Note that the referer cannot be completely trusted
// as some agents either do not set a referer or allow
// the user to modify the referer at will. It is, however,
// often useful for troubleshooting.
$referer = $_SERVER[‘HTTP_REFERER’];
$remote = $_SERVER[‘REMOTE_ADDR’];
print &#034;
<h1>403: Forbidden</h1>

&nbsp;

&#034;;
if ($uri == ‘/403/403.php’) {
	print &#034;

You have reached the custom 403 error page for mysite.com. Was it everything you were hoping for?

&#034;;
}
else if (substr($uri, -1, 1) == ‘/’) {
    print &#034;

Sorry, this directory cannot be browsed.

If you received this message by clicking on a link on this website, please <a href=\&#034;mailto:webmaster@mysite.com?subject=403: Bad Directory Link&#038;body=$bad_link from $referer\&#034;>report it to the webmaster</a>.

&#034;;
}
else {
    print &#034;

You have attempted to access a resource (<?=$uri?>) for which you do not have the proper authorization or which is not available from your location.

If you received this message by clicking on a link on this website, please <a href=\&#034;mailto:webmaster@mysite.com?subject=403 Error&#038;body=$bad_link from $referer reached by $remote\&#034;>report it to the webmaster</a>.

&#034;;
}
print &#034;</body>
</html>
&#034;;
?></pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c5298b8a6684">
<div class="synthi_header" style="font-weight:bold;"> PHP <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c5298b8a6684').style.display='block';document.getElementById('styled_synthi_4c5298b8a6684').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="php" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;html&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;head&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;title&gt;Sample 403 Error Document&lt;/title&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;/head&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;body&gt;&quot;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$server</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘SERVER_NAME’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$uri</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘REQUEST_URI’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$bad_link</span> = <span style="color: #0000ff;">$server</span>.<span style="color: #0000ff;">$uri</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// Note that the referer cannot be completely trusted</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// as some agents either do not set a referer or allow</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// the user to modify the referer at will. It is, however,</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// often useful for troubleshooting.</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$referer</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘HTTP_REFERER’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$remote</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘REMOTE_ADDR’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;h1&gt;403: Forbidden&lt;/h1&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;p&gt;&amp;nbsp;&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$uri</span> == ‘/<span style="color: #cc66cc;">403</span>/<span style="color: #cc66cc;">403</span>.php’<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> </div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;">&nbsp; &nbsp; &nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;p&gt;You have reached the custom 403 error page for mysite.com. Was it everything you were hoping for?&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #b1b100;">else</span> <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><a href="http://www.php.net/substr"><span style="color: #000066;">substr</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$uri</span>, <span style="color: #cc66cc;">-1</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> == ‘/’<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;">&nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;p&gt;Sorry, this directory cannot be browsed.&lt;/p&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&nbsp; &nbsp; &lt;p&gt;If you received this message by clicking on a link on this website, please &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>mailto:webmaster@mysite.com?subject=403: Bad Directory Link&amp;body=$bad_link from $referer<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;report it to the webmaster&lt;/a&gt;.&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;">&nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;p&gt;You have attempted to access a resource (&lt;?=$uri?&gt;) for which you do not have the proper authorization or which is not available from your location.&lt;/p&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&nbsp; &nbsp; &lt;p&gt;If you received this message by clicking on a link on this website, please &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>mailto:webmaster@mysite.com?subject=403 Error&amp;body=$bad_link from $referer reached by $remote<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;report it to the webmaster&lt;/a&gt;.&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;/body&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;/html&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #000000; font-weight: bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
<p>Sample 404 error page:</p>
<div class="synthi_code" style="display:none;" id ="plain_synthi_4c5298b8c4365">
<div class="synthi_header" style="font-weight:bold;"> PHP <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('styled_synthi_4c5298b8c4365').style.display='block';document.getElementById('plain_synthi_4c5298b8c4365').style.display='none';return false">Show Styled Code</a>]:</span></div>
<pre style="width:100%;overflow:auto;">
<?php
print &#034;<html>
<head>

</head>
<body>&#034;
$server = $_SERVER[‘SERVER_NAME’];
$uri = $_SERVER[‘REQUEST_URI’];
$bad_link = $server.$uri;
// Note that the referer cannot be completely trusted
// as some agents either do not set a referer or allow
// the user to modify the referer at will. It is, however,
// often useful for troubleshooting.
$referer = $_SERVER[‘HTTP_REFERER’];
print &#034;
<h1>404: File Not Found</h1>

&nbsp;

&#034;;
if ($uri == ‘/404/404.php’) {
    print &#034;

You have reached the custom 404 error page for mysite.com. Was it everything you were hoping for?

&#034;;
}
else {
    print &#034;

Sorry, that file (<?=$uri?>) does not seem to exist.

If you received this message by clicking on a link on this website, please <a href=\&#034;mailto:webmaster@mysite.com?subject=Bad Link&#038;body=$bad_link from $referer\&#034;>report it to the webmaster</a>.

&#034;;
}
print &#034;</body>
</html>
&#034;;
?></pre>
</div>
<div class="synthi_code" style="display:block;" id ="styled_synthi_4c5298b8c4365">
<div class="synthi_header" style="font-weight:bold;"> PHP <span  class="synthi_button"style="font-weight:lighter;font-size:smaller;">[<a href="#" onClick="javascript:document.getElementById('plain_synthi_4c5298b8c4365').style.display='block';document.getElementById('styled_synthi_4c5298b8c4365').style.display='none';return false">Show Plain Code</a>]:</span></div>
<div class="php" style="font-family: monospace;">
<ol>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #000000; font-weight: bold;">&lt;?php</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;html&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;head&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;title&gt;Sample 403 Error Document&lt;/title&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;/head&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;body&gt;&quot;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$server</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘SERVER_NAME’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$uri</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘REQUEST_URI’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$bad_link</span> = <span style="color: #0000ff;">$server</span>.<span style="color: #0000ff;">$uri</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// Note that the referer cannot be completely trusted</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// as some agents either do not set a referer or allow</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// the user to modify the referer at will. It is, however,</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #808080; font-style: italic;">// often useful for troubleshooting.</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #0000ff;">$referer</span> = <span style="color: #0000ff;">$_SERVER</span><span style="color: #66cc66;">&#91;</span>‘HTTP_REFERER’<span style="color: #66cc66;">&#93;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;h1&gt;404: File Not Found&lt;/h1&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;p&gt;&amp;nbsp;&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$uri</span> == ‘/<span style="color: #cc66cc;">404</span>/<span style="color: #cc66cc;">404</span>.php’<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;">&nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;p&gt;You have reached the custom 404 error page for mysite.com. Was it everything you were hoping for?&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;">&nbsp; &nbsp; <a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;p&gt;Sorry, that file (&lt;?=$uri?&gt;) does not seem to exist.&lt;/p&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&nbsp; &nbsp; &lt;p&gt;If you received this message by clicking on a link on this website, please &lt;a href=<span style="color: #000099; font-weight: bold;">\&quot;</span>mailto:webmaster@mysite.com?subject=Bad Link&amp;body=$bad_link from $referer<span style="color: #000099; font-weight: bold;">\&quot;</span>&gt;report it to the webmaster&lt;/a&gt;.&lt;/p&gt;&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #66cc66;">&#125;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><a href="http://www.php.net/print"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&lt;/body&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&lt;/html&gt;</span></div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #ff0000;">&quot;</span>;</div>
</li>
<li style="font-weight: bold;">
<div style="font-family: 'Courier New', Courier, monospace; font-weight: normal; font-size: 1.2em;"><span style="color: #000000; font-weight: bold;">?&gt;</span> </div>
</li>
</ol>
</div>
</div>
<p>Of course you would make sure the styles, links, mailtos, site name, etc are right for your site, but this gives you an idea.</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/ErrorDocument" class="performancingtags" rel="tag">ErrorDocument</a>, <a href="http://technorati.com/tag/Apache" class="performancingtags" rel="tag">Apache</a>, <a href="http://technorati.com/tag/PHP" class="performancingtags" rel="tag">PHP</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Useful+custom+403+and+404+error+pages+with+PHP+http://z5dsh.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;submitHeadline=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;submitHeadline=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Useful+custom+403+and+404+error+pages+with+PHP&amp;link=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Useful+custom+403+and+404+error+pages+with+PHP&amp;link=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/&amp;title=Useful+custom+403+and+404+error+pages+with+PHP" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2007/06/11/useful-custom-403-and-404-error-pages-with-php/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getting the latest and greatest</title>
		<link>http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/</link>
		<comments>http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/#comments</comments>
		<pubDate>Sun, 08 Apr 2007 18:04:14 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/</guid>
		<description><![CDATA[I love (almost) everything about my new Mac. From a hardware standpoint I am ecstatic. The operating system is very nice (although I wish I could have waited until 10.5 so I could have multiple desktops like every other *nix variant.) The bundled tools are, for the most part, useful and usable &#8211; with one [...]]]></description>
			<content:encoded><![CDATA[<p>I love (almost) everything about my new Mac. From a hardware standpoint I am ecstatic. The operating system is very nice (although I wish I could have waited until 10.5 so I could have multiple desktops like every other *nix variant.) The bundled tools are, for the most part, useful and usable &#8211; with one exception: the versions of Apache and PHP included.</p>
<p>Sure, there are plenty of people out there hosting on Apache 1.3.x and still plenty more using PHP 4.x &#8211; but I&#8217;m not one of them. At the very least I need to have a working Apache 2.0.x and PHP 5.x so I can test before deploying on my production server. There are plenty of guides online to <a href="http://www.google.com/search?hl=en&amp;q=OS+X+install+Apache2&amp;btnG=Search"><em>add</em> Apache 2.x</a> and/or PHP5, but nothing on <em>replacing</em> the defaults. While I am all ok with testing on multiple versions, the multiple versions I would rather test on would be 2.0.x as default and 2.2.x as the upgradeability testbed.</p>
<p>I&#8217;m sure there is a way to do this, I just have to find it &#8230;</p>
<p>Technorati Tags: <a href="http://technorati.com/tag/Apache" class="performancingtags" rel="tag">Apache</a>, <a href="http://technorati.com/tag/PHP" class="performancingtags" rel="tag">PHP</a>, <a href="http://technorati.com/tag/OS%20X" class="performancingtags" rel="tag">OS X</a></p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Getting+the+latest+and+greatest+http://md8yp.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;submitHeadline=Getting+the+latest+and+greatest" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;submitHeadline=Getting+the+latest+and+greatest" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Getting+the+latest+and+greatest&amp;link=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Getting+the+latest+and+greatest&amp;link=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/&amp;title=Getting+the+latest+and+greatest" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2007/04/08/getting-the-latest-and-greatest/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache 2.2 is out</title>
		<link>http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/</link>
		<comments>http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/#comments</comments>
		<pubDate>Sat, 04 Feb 2006 23:18:00 +0000</pubDate>
		<dc:creator>Sjan Evardsson</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/</guid>
		<description><![CDATA[I realize I am a little late in posting this, but Apache have announced the release of Apache 2.2. From a quick look at the release notes it looks like they have gotten the cache handlers working and stable, including a cache cleaning portion. Now the question is, do I stick with 2.0.5x or I [...]]]></description>
			<content:encoded><![CDATA[<p>I realize I am a little late in posting this, but <a href="http://httpd.apache.org" title="Apache  HTTP Server" target="_blank">Apache</a>  have <a href="http://www.apache.org/dist/httpd/Announcement2.2.html" title="Apache 2.2 announcement" target="_blank">announced the release of Apache 2.2</a>. From a quick look at the release notes it looks like they have gotten the cache handlers working and stable, including a cache cleaning portion.</p>
<p>Now the question is, do I stick with 2.0.5x or I do I jump on the 2.2 train?</p>
<p align="left"><a class="tt" href="http://twitter.com/home/?status=Apache+2.2+is+out+http://3m28o.th8.us" title="Post to Twitter"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-twitter.png" alt="Post to Twitter" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;submitHeadline=Apache+2.2+is+out" title="Post to Yahoo Buzz"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-buzz.png" alt="Post to Yahoo Buzz" /></a> <a class="tt" href="http://buzz.yahoo.com/submit?submitUrl=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;submitHeadline=Apache+2.2+is+out" title="Post to Yahoo Buzz">Buzz This Post</a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Delicious"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-delicious.png" alt="Post to Delicious" /></a> <a class="tt" href="http://delicious.com/post?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Delicious">Delicious</a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Digg"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-digg.png" alt="Post to Digg" /></a> <a class="tt" href="http://digg.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Digg">Digg This Post</a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+2.2+is+out&amp;link=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/" title="Post to Ping.fm"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-ping.png" alt="Post to Ping.fm" /></a> <a class="tt" href="http://ping.fm/ref/?method=microblog&amp;title=Apache+2.2+is+out&amp;link=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/" title="Post to Ping.fm">Ping This Post</a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Reddit"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-reddit.png" alt="Post to Reddit" /></a> <a class="tt" href="http://reddit.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to Reddit">Reddit</a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to StumbleUpon"><img class="nothumb" src="http://www.evardsson.com/blog/wp-content/plugins/tweet-this/icons/tt-su.png" alt="Post to StumbleUpon" /></a> <a class="tt" href="http://stumbleupon.com/submit?url=http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/&amp;title=Apache+2.2+is+out" title="Post to StumbleUpon">Stumble This Post</a></p>]]></content:encoded>
			<wfw:commentRss>http://www.evardsson.com/blog/2006/02/04/apache-22-is-out/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
