<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: PHP and HTTP making friends</title>
	<atom:link href="http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/</link>
	<description></description>
	<pubDate>Sun, 07 Sep 2008 03:00:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: codestorm</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10667</link>
		<dc:creator>codestorm</dc:creator>
		<pubDate>Thu, 10 Nov 2005 05:25:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10667</guid>
		<description>Also slightly off topic; please proofread your posts. Please.</description>
		<content:encoded><![CDATA[<p>Also slightly off topic; please proofread your posts. Please.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: solutionsphp</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10603</link>
		<dc:creator>solutionsphp</dc:creator>
		<pubDate>Tue, 08 Nov 2005 18:49:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10603</guid>
		<description>Sorry, this is slightly off topic... I noticed that my subscription to this feed stopped sending me new articles about a month ago. I'm using Thunderbird to manage RSS. I have tried setting up this feeds again, but Thunderbird just takes forever trying to validate the feed, never does, and I am unable to subscribe. I have validated the feed and it passes. I CAN subscribe to other SitePoint feeds, just not this one right now. Is anyone else is having trouble subscribing to this feed?

cheers
SAM :)</description>
		<content:encoded><![CDATA[<p>Sorry, this is slightly off topic&#8230; I noticed that my subscription to this feed stopped sending me new articles about a month ago. I&#8217;m using Thunderbird to manage RSS. I have tried setting up this feeds again, but Thunderbird just takes forever trying to validate the feed, never does, and I am unable to subscribe. I have validated the feed and it passes. I CAN subscribe to other SitePoint feeds, just not this one right now. Is anyone else is having trouble subscribing to this feed?</p>
<p>cheers<br />
SAM :)</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Maarten Manders</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10601</link>
		<dc:creator>Maarten Manders</dc:creator>
		<pubDate>Tue, 08 Nov 2005 18:01:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10601</guid>
		<description>Here's what i found out about the KeepAlive-Issue (tested with Apache2, PHP4 and PHP 5):

Apache's default KeepAlive header looks like this:
&lt;code&gt;Keep-Alive: timeout=15, max=100\r\n&lt;/code&gt;
Which means: The connection stays open for 15 seconds after the last HTTP response. Additionally, there is a maximum of 100 subsequent requests allowed to prevent a user from keeping the connection open forever and thus hogging your server resources (RAM, that is, which is bad).

1. Regardless of what Apache's value of KeepAlive is, $_SERVER['HTTP_KEEP_ALIVE'] always seems to be equal '300'. This might be a bug.

2. I haven't been able to change the KeepAlive header with header('Keep-Alive: timeout=123, max=123').

3. apache_setenv('KeepAliveTimeout', 123) seems to be useless as well.

4. One may change the KeepAlive in the apache config with:
&lt;code&gt;KeepAlive 123&lt;/code&gt;
This accordingly changes the KeepAlive header sent to the client. However, changing the maximum requests count with
&lt;code&gt;KeepAliveTimeout 321&lt;/code&gt;
doesn't seem to change the header in any way. It stays at it's default value ('100'). Then again I've seen Apache servers with a different max requests value so there must be a way to change it.

I'll try to investigate this further as soon as i find more time.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s what i found out about the KeepAlive-Issue (tested with Apache2, PHP4 and PHP 5):</p>
<p>Apache&#8217;s default KeepAlive header looks like this:<br />
<code>Keep-Alive: timeout=15, max=100\r\n</code><br />
Which means: The connection stays open for 15 seconds after the last HTTP response. Additionally, there is a maximum of 100 subsequent requests allowed to prevent a user from keeping the connection open forever and thus hogging your server resources (RAM, that is, which is bad).</p>
<p>1. Regardless of what Apache&#8217;s value of KeepAlive is, $_SERVER[&#8217;HTTP_KEEP_ALIVE&#8217;] always seems to be equal &#8216;300&#8242;. This might be a bug.</p>
<p>2. I haven&#8217;t been able to change the KeepAlive header with header(&#8217;Keep-Alive: timeout=123, max=123&#8242;).</p>
<p>3. apache_setenv(&#8217;KeepAliveTimeout&#8217;, 123) seems to be useless as well.</p>
<p>4. One may change the KeepAlive in the apache config with:<br />
<code>KeepAlive 123</code><br />
This accordingly changes the KeepAlive header sent to the client. However, changing the maximum requests count with<br />
<code>KeepAliveTimeout 321</code><br />
doesn&#8217;t seem to change the header in any way. It stays at it&#8217;s default value (&#8217;100&#8242;). Then again I&#8217;ve seen Apache servers with a different max requests value so there must be a way to change it.</p>
<p>I&#8217;ll try to investigate this further as soon as i find more time.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: HarryF</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10581</link>
		<dc:creator>HarryF</dc:creator>
		<pubDate>Tue, 08 Nov 2005 09:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10581</guid>
		<description>&lt;blockquote&gt;
Are there any known security issues or concerns so far?
&lt;/blockquote&gt;

For pecl_http? I guess one potential issue will be making sure that pages server "inside" an authenticated session don't end up being cached by intermediate proxy servers - the problem is well described in the presentation I linked to above. Needs investigation.

&lt;blockquote&gt;
Thinking of PHP and HTTP: I’ve been wondering if there’s a way to change HTTP_KEEP_ALIVE for a current connection from within PHP. Being able to lower it would help a great deal in increasing performance under heavy load.
&lt;/blockquote&gt;

I guess you could modify it with &lt;a href="http://www.php.net/apache_setenv" rel="nofollow"&gt;apache_setenv&lt;/a&gt; but whether that effect an active HTTP connection I don't know. There's probably some nightmares with IE + SSL as well.

Did you see the part in pecl_http about bandwidth throttling BTW? Not directly related but gives an indication of the sort of things that work with pecl_http.

&lt;blockquote&gt;
Or is there an Apache module to dynamically change the keepalive time depending on the httpd load? 
&lt;/blockquote&gt;

Not that I'm aware of. Think, in general, keep alives with dynamic pages is largely unknown territory.</description>
		<content:encoded><![CDATA[<blockquote><p>
Are there any known security issues or concerns so far?
</p></blockquote>
<p>For pecl_http? I guess one potential issue will be making sure that pages server &#8220;inside&#8221; an authenticated session don&#8217;t end up being cached by intermediate proxy servers - the problem is well described in the presentation I linked to above. Needs investigation.</p>
<blockquote><p>
Thinking of PHP and HTTP: I’ve been wondering if there’s a way to change HTTP_KEEP_ALIVE for a current connection from within PHP. Being able to lower it would help a great deal in increasing performance under heavy load.
</p></blockquote>
<p>I guess you could modify it with <a href="http://www.php.net/apache_setenv" rel="nofollow">apache_setenv</a> but whether that effect an active HTTP connection I don&#8217;t know. There&#8217;s probably some nightmares with IE + SSL as well.</p>
<p>Did you see the part in pecl_http about bandwidth throttling BTW? Not directly related but gives an indication of the sort of things that work with pecl_http.</p>
<blockquote><p>
Or is there an Apache module to dynamically change the keepalive time depending on the httpd load?
</p></blockquote>
<p>Not that I&#8217;m aware of. Think, in general, keep alives with dynamic pages is largely unknown territory.</p>]]></content:encoded>
	</item>
	<item>
		<title>By: Maarten Manders</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10558</link>
		<dc:creator>Maarten Manders</dc:creator>
		<pubDate>Mon, 07 Nov 2005 14:35:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10558</guid>
		<description>Thinking of PHP and HTTP: I've been wondering if there's a way to change HTTP_KEEP_ALIVE for a current connection from within PHP. Being able to lower it would help a great deal in increasing performance under heavy load.

Or is there an Apache module to dynamically change the keepalive time depending on the httpd load?</description>
		<content:encoded><![CDATA[<p>Thinking of PHP and HTTP: I&#8217;ve been wondering if there&#8217;s a way to change HTTP_KEEP_ALIVE for a current connection from within PHP. Being able to lower it would help a great deal in increasing performance under heavy load.</p>
<p>Or is there an Apache module to dynamically change the keepalive time depending on the httpd load?</p>]]></content:encoded>
	</item>
	<item>
		<title>By: patrikG</title>
		<link>http://www.sitepoint.com/blogs/2005/11/07/php-and-http-making-friends/#comment-10553</link>
		<dc:creator>patrikG</dc:creator>
		<pubDate>Mon, 07 Nov 2005 11:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.sitepoint.com/blogs/?p=1287#comment-10553</guid>
		<description>pecl_http: great potential, never heard of it. Thanks for the info.
I'm always a wee bit careful with AJAX, live_http, etc. due to the amount of hits they generate. The caching feature on pecl_http sounds fantastic (almost too good to be true). 

Are there any known security issues or concerns so far?</description>
		<content:encoded><![CDATA[<p>pecl_http: great potential, never heard of it. Thanks for the info.<br />
I&#8217;m always a wee bit careful with AJAX, live_http, etc. due to the amount of hits they generate. The caching feature on pecl_http sounds fantastic (almost too good to be true). </p>
<p>Are there any known security issues or concerns so far?</p>]]></content:encoded>
	</item>
</channel>
</rss>
