<?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>Paul Turner &#187; Apache</title>
	<atom:link href="http://paulturner.me/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://paulturner.me</link>
	<description>What was that again?</description>
	<lastBuildDate>Wed, 24 Mar 2010 13:49:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Internet Explorer 6 and HTTP compression</title>
		<link>http://paulturner.me/2008/08/internet-explorer-6-and-http-compression/</link>
		<comments>http://paulturner.me/2008/08/internet-explorer-6-and-http-compression/#comments</comments>
		<pubDate>Fri, 22 Aug 2008 16:19:09 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=46</guid>
		<description><![CDATA[Recently I wrote about installing mod_gzip on CentOS 5. However since then I have discovered that Internet Explorer 6 has does not support this properly, and intermittently does not load items properly! To resolve this I had to change the Apache configuration. This is the configuration that I am now using: AddOutputFilterByType DEFLATE text/html text/plain [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I wrote about <a href="http://paul-turner.net/2008/08/installing-mod_gzip-on-centos-5/">installing mod_gzip on CentOS 5</a>.  However since then I have discovered that Internet Explorer 6 has does not support this properly, and intermittently does not load items properly!</p>
<p>To resolve this I had to change the Apache configuration.  This is the configuration that I am now using:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.[0678] no-gzip<br />
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html<br />
BrowserMatch \bOpera !no-gzip<br />
Header append Vary User-Agent</div></div>
<p>This turns off the HTTP compression based on their user agent.</p>
<p>Here are some of the known issues:<br />
<a href="http://support.microsoft.com/kb/321722/EN-US/">http://support.microsoft.com/kb/321722/EN-US/</a> (IE5.5, IE6 and IE6SP1 always cache gzip encoded content)<br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;LN;Q312496">http://support.microsoft.com/default.aspx?scid=kb;LN;Q312496</a> (IE6<sp1 could lose the first 2ko of the gzip document)<br />
<a href="http://support.microsoft.com/default.aspx?scid=kb;en-us;823386&#038;Product=ie600">http://support.microsoft.com/default.aspx?scid=kb;en-us;823386&#038;Product=ie600</a> (IE6sp1, compressed HTML pages only partially appear)</p>
<p>And this is one of the sites I found to help with the resolution:<br />
<a href="http://www.contentwithstyle.co.uk/Blog/147/">http://www.contentwithstyle.co.uk/Blog/147/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/08/internet-explorer-6-and-http-compression/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Installing PHP XCache on CentOS 5</title>
		<link>http://paulturner.me/2008/08/installing-php-xcache-on-centos-5/</link>
		<comments>http://paulturner.me/2008/08/installing-php-xcache-on-centos-5/#comments</comments>
		<pubDate>Mon, 11 Aug 2008 09:35:19 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=19</guid>
		<description><![CDATA[XCache is a PHP opcode cacher, which basically means that it will cache the compiled code the first time a PHP page/script is executed thus avoiding the compilation step on subsequent executions. I used the 1.2.2. release of XCache and followed the quick guide instructions to install from source. The installation requires that the php-devel [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://xcache.lighttpd.net/">XCache</a> is a PHP opcode cacher, which basically means that it will cache the compiled code the first time a PHP page/script is executed thus avoiding the compilation step on subsequent executions.</p>
<p>I used the <a href="http://xcache.lighttpd.net/wiki/Release-1.2.2">1.2.2.</a> release of XCache and followed the <a href="http://xcache.lighttpd.net/wiki/InstallFromSource">quick guide</a> instructions to install from source.</p>
<p>The installation requires that the php-devel package is installed.  This is required to compile PHP extensions (the comand phpize is required for this installation).</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[root@testserver xcache-1.2.2]# yum install php-devel<br />
Dependencies Resolved<br />
=============================================================================<br />
&nbsp;Package &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Arch &nbsp; &nbsp; &nbsp; Version &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Repository &nbsp; &nbsp; &nbsp; &nbsp;Size<br />
=============================================================================<br />
Installing:<br />
&nbsp;php-devel &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 512 k<br />
Updating for dependencies:<br />
&nbsp;php &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1.1 M<br />
&nbsp;php-cli &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2.1 M<br />
&nbsp;php-common &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 154 k<br />
&nbsp;php-gd &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 113 k<br />
&nbsp;php-ldap &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;35 k<br />
&nbsp;php-mbstring &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 969 k<br />
&nbsp;php-mysql &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;84 k<br />
&nbsp;php-pdo &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;62 k<br />
&nbsp;php-xml &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; i386 &nbsp; &nbsp; &nbsp; 5.1.6-20.el5_2.1 &nbsp;updates &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;94 k<br />
Transaction Summary<br />
=============================================================================<br />
Install &nbsp; &nbsp; &nbsp;1 Package(s)<br />
Update &nbsp; &nbsp; &nbsp; 9 Package(s)<br />
Remove &nbsp; &nbsp; &nbsp; 0 Package(s)<br />
Total download size: 5.2 M<br />
Is this ok [y/N]:</div></div>
<p>It appears that this will also update the core PHP package and dependancies, so care should be taken.  Try this on a test server and not your production server! </p>
<p>Here are the steps I took to install XCache:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[root@testserver ~]# tar -zxf xcache-1.2.2.tar.gz<br />
[root@testserver ~]# cd xcache-1.2.2<br />
[root@testserver xcache-1.2.2]# phpize<br />
[root@testserver xcache-1.2.2]# ./configure --enable-xcache<br />
[root@testserver xcache-1.2.2]# make<br />
[root@testserver xcache-1.2.2]# make install<br />
[root@testserver xcache-1.2.2]# cp /etc/php.ini /etc/php.ini.bk<br />
[root@testserver xcache-1.2.2]# cat xcache.ini &gt;&gt; /etc/php.ini</div></div>
<p>In my configuration the xcache.ini and resulting php.ini had the wrong path to the module that has been installed.  The module was installed in /usr/lib/php/modules/ but the configuration was looking in /usr/local/lib/php/extensions/non-debug-non-zts-xxx/.  </p>
<p>All that was needed was a simple change to the configuration file to comment out the fully qualified path and tell it to use the extensions directory:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[xcache-common]<br />
;; install as zend extension (recommended), normally &quot;$extension_dir/xcache.so&quot;<br />
;; zend_extension = /usr/local/lib/php/extensions/non-debug-non-zts-xxx/xcache.so<br />
; zend_extension_ts = /usr/local/lib/php/extensions/non-debug-zts-xxx/xcache.so<br />
;; For windows users, replace xcache.so with php_xcache.dll<br />
;; zend_extension_ts = c:/php/extensions/php_xcache.dll<br />
;; or install as extension, make sure your extension_dir setting is correct<br />
&nbsp;extension = xcache.so<br />
;; or win32:<br />
; extension = php_xcache.dll</div></div>
<p>Then just check it&#8217;s installed:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[root@testserver xcache-1.2.2]# php -v<br />
PHP 5.1.6 (cli) (built: Jul 16 2008 19:53:00)<br />
Copyright (c) 1997-2006 The PHP Group<br />
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies<br />
&nbsp; &nbsp; with XCache v1.2.2, Copyright (c) 2005-2007, by mOo</div></div>
<p>Success!  However Apache must be restarted in order for this to work with PHP web pages.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">service httpd restart</div></div>
<p>Now if you access a page containing the phpinfo(); function you should be able to search for XCache and find it.</p>
<p>XCache is now installed and running.</p>
<p>I did not see the need to install the php-devel package on our live servers and I know that our live servers are identical to our test servers other than hard disk and memory sizes (we use VMWare extensively and they come from the same template).</p>
<p>This means that all the binaries compiled on the test server should be compatible with our live servers, so I just copied the xcache-1.2.2 folder from the test server and followed the above steps again starting with the &#8220;make install&#8221; step.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[root@testserver ~]# tar -cvzf xcache-install.tgz xcache-1.2.2/</div></div>
<p>copy this to the /root/ directory on the live server</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">[root@liveserver ~]# tar -xvzf xcache-install.tgz<br />
[root@liveserver xcache-1.2.2]# make install<br />
[root@liveserver xcache-1.2.2]# cp /etc/php.ini /etc/php.ini.bk<br />
[root@liveserver xcache-1.2.2]# cat xcache.ini &gt;&gt; /etc/php.ini<br />
[root@liveserver xcache-1.2.2]# vi /etc/php.ini<br />
[root@liveserver xcache-1.2.2]# php -v<br />
PHP 5.1.6 (cli) (built: Sep 20 2007 10:16:10)<br />
Copyright (c) 1997-2006 The PHP Group<br />
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies<br />
&nbsp; &nbsp; with XCache v1.2.2, Copyright (c) 2005-2007, by mOo</div></div>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/08/installing-php-xcache-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing mod_gzip on CentOS 5</title>
		<link>http://paulturner.me/2008/08/installing-mod_gzip-on-centos-5/</link>
		<comments>http://paulturner.me/2008/08/installing-mod_gzip-on-centos-5/#comments</comments>
		<pubDate>Fri, 01 Aug 2008 12:50:50 +0000</pubDate>
		<dc:creator>Paul</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://paul-turner.net/?p=10</guid>
		<description><![CDATA[CentOS 5 is packaged with Apache 2 which is not compatible with mod_gzip. The module mod_deflate is the Apache 2 equivalent. Installing mod_deflate on CentOS 5 is a fairly simple process. The module is included in CentOS 5 and just need to be configured. The only changes required are to the Apache configuration file /etc/httpd/conf/httpd.conf. [...]]]></description>
			<content:encoded><![CDATA[<p>CentOS 5 is packaged with Apache 2 which is not compatible with mod_gzip.  The module mod_deflate is the Apache 2 equivalent.</p>
<p>Installing mod_deflate on CentOS 5 is a fairly simple process.  The module is included in CentOS 5 and just need to be configured.</p>
<p>The only changes required are to the Apache configuration file /etc/httpd/conf/httpd.conf.  I recommend that you take a backup before you make any changes.</p>
<p>Here are the steps that I took:</p>
<p><strong>1. Check that the deflate module is loaded.</strong><br />
In my configuration file this was already done with this line:</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">LoadModule deflate_module modules/mod_deflate.so</div></div>
<p>If this is not there then I suspect all that is required is to add this line.  However if you need to do this I recommend that you check the module /etc/httpd/modules/mod_deflate.so is installed.</p>
<p><strong>2. Configure the deflate module</strong><br />
All that was required was to add the following lines to the Apache configuration file.</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css text/javascript application/x-javascript<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html<br />
BrowserMatch ^Mozilla/4\.[0678] no-gzip<br />
BrowserMatch \bMSIE\s7 !no-gzip !gzip-only-text/html<br />
BrowserMatch \bOpera !no-gzip<br />
Header append Vary User-Agent</div></div>
<p><em>Update 26/08/2008: Originally I only had the first line of the above configuration.  However it turns out that there are issues with <a href="http://paul-turner.net/2008/08/internet-explorer-6-and-http-compression/">Internet Explorer 6 and HTTP compression</a>.</em></p>
<p>I added this after</p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">AddType text/html .shtml<br />
AddOutputFilter INCLUDES .shtml</div></div>
<p>but you should be able to add it anywhere in the main section.</p>
<p><strong>3. Restart Apache</strong></p>
<div class="codecolorer-container text default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="text codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">service httpd restart</div></div>
<p><strong>4. Test it&#8217;s working</strong><br />
The easiest way to check that it is working is with the YSlow plugin for Firebug.  Firebug is a Firefox plugin that will give you lots of useful information.</p>
<p>To test just load a page in your browser, go to the Firebug/YSlow plug and select the &#8220;Performance&#8221; option.  This will give you a performance grade.  You should hopefully see an &#8220;A&#8221; for &#8220;4. Gzip components&#8221;.  If not do a Ctrl-F5 to ensure that you&#8217;re not viewing cached content.</p>
<p>If this still does not report an &#8220;A&#8221; for &#8220;4. Gzip components&#8221;. then it is possible that your page has other content types that need to be added for YSlow to be happy.</p>
<p><strong>Summary</strong><br />
This is only a quick overview of the steps I took, and by no means comprehensive  A more detailed tutorial is available here: <a href="http://www.howtoforge.com/apache2_mod_deflate">http://www.howtoforge.com/apache2_mod_deflate</a></p>
]]></content:encoded>
			<wfw:commentRss>http://paulturner.me/2008/08/installing-mod_gzip-on-centos-5/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
