<?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>Pacecode Blog &#187; server configuration</title>
	<atom:link href="http://www.pacecode.com/blog/category/server-configuration/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pacecode.com/blog</link>
	<description>Tips,Ideas, Free scripts and more...</description>
	<lastBuildDate>Sat, 24 Apr 2010 16:39:55 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Magic with htaccess file &#8211; Increase execution time, session expiry time and file upload size limit</title>
		<link>http://www.pacecode.com/blog/2008/09/22/magic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit/</link>
		<comments>http://www.pacecode.com/blog/2008/09/22/magic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit/#comments</comments>
		<pubDate>Mon, 22 Sep 2008 17:38:10 +0000</pubDate>
		<dc:creator>Raja MM</dc:creator>
				<category><![CDATA[htaccess]]></category>
		<category><![CDATA[server configuration]]></category>
		<category><![CDATA[all in one htaccess process]]></category>
		<category><![CDATA[handling server variable with htaccess]]></category>
		<category><![CDATA[htaccess and php ini]]></category>
		<category><![CDATA[htaccess for file execution time]]></category>
		<category><![CDATA[htaccess for file upload limit]]></category>
		<category><![CDATA[htaccess for sesssion expiry]]></category>
		<category><![CDATA[htaccess to increase memory limit]]></category>
		<category><![CDATA[magic with htaccess]]></category>
		<category><![CDATA[server configuration file changes with htaccess]]></category>

		<guid isPermaLink="false">http://www.pacecode.com/blog/?p=13</guid>
		<description><![CDATA[&#60;IfModule mod_php5.c&#62;
php_value post_max_size 5M
php_value upload_max_filesize 5M
php_value memory_limit 300M
php_value max_execution_time 259200
php_value max_input_time 259200
php_value session.gc_maxlifetime 1200
&#60;/IfModule&#62;
php_value memory_limit 300M &#8211; Set higher default php_value memory_limit in .htaccess
upload_max_filesize 5M - it increases default upload limit. The default upload limit is 2MB. the above htaccess increase increases file limit 2mb to 5 mb
php_value max_execution_time: 
Set the number of seconds a [...]]]></description>
			<content:encoded><![CDATA[<p>&lt;IfModule mod_php5.c&gt;<br />
php_value post_max_size 5M<br />
php_value upload_max_filesize 5M<br />
php_value memory_limit 300M<br />
php_value max_execution_time 259200<br />
php_value max_input_time 259200<br />
php_value session.gc_maxlifetime 1200<br />
&lt;/IfModule&gt;</p>
<p><strong>php_value memory_limit 300M</strong> &#8211; Set higher default php_value memory_limit in .htaccess</p>
<p><strong>upload_max_filesize 5M </strong>- it increases default upload limit. The default upload limit is 2MB. the above htaccess increase increases file limit 2mb to 5 mb</p>
<p><strong>php_value max_execution_time: </strong></p>
<p>Set the number of seconds a script is allowed to run. If this is reached,<br />
the script returns a fatal error. The default limit is 30 seconds or, if it<br />
exists, the max_execution_time value defined in the configuration file. If<br />
seconds is set to zero, no time limit is imposed.</p>
<p><strong>php_value session.gc_maxlifetime: </strong></p>
<p>The session.gc_maxlifetime only sets the age of the session files that will be deleted when</p>
<p>garbage collection runs.</p>
<p>If you have a busy web site with a lot of sessions being created, garbage collection will</p>
<p>run based on session.gc_probability/session.gc_divisor. Despite this being called</p>
<p>&#8220;probability&#8221; I tested this and it is strictly a count. Using the default</p>
<p>gc_probability/gc_divisor of 1/100, this means that garbage collection will run every 100</p>
<p>new sessions (Edit: Actually this occurs within the session_start() coding and would count</p>
<p>re-started sessions as well) and delete any existing session files that are older than the</p>
<p>session.gc_maxlifetime. There is no file locking on the session files, so active session</p>
<p>files will be deleted and things like users getting logged out will occur.</p>
<p>If this is on shared hosting and the session files are all kept in the default location and</p>
<p>someone else is using a smaller session.gc_maxlifetime or a more frequent</p>
<p>gc_probability/gc_divisor, then any of the session files will get deleted based on the</p>
<p>lowest value of gc_maxlifetime and the most frequent gc_probability/gc_divisor.</p>
<p>You need to increase session.gc_maxlifetime or make session.gc_divisor larger and if this is</p>
<p>on shared hosting, set session.save_path to be a location within your web space.</p>
<!-- Social Bookmarks BEGIN -->
<div class="social_bookmark">
<a><strong><em>Share this post</em></strong></a>
<br />
<div class="d">
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://buzz.yahoo.com/submit?submitUrl=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;submitHeadline=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit&amp;submitSummary=" rel="nofollow" title="Add to&nbsp;Buzz"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/buzz.png" title="Add to&nbsp;Buzz" alt="Add to&nbsp;Buzz" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://del.icio.us/post?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;title=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Del.icio.us"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/delicious.png" title="Add to&nbsp;Del.icio.us" alt="Add to&nbsp;Del.icio.us" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://digg.com/submit?phase=2&amp;url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;title=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;digg"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/digg.png" title="Add to&nbsp;digg" alt="Add to&nbsp;digg" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.facebook.com/sharer.php?u=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F" rel="nofollow" title="Add to&nbsp;Facebook"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/facebook.png" title="Add to&nbsp;Facebook" alt="Add to&nbsp;Facebook" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.google.com/bookmarks/mark?op=edit&amp;output=popup&amp;bkmk=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;title=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Google Bookmarks"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/google.png" title="Add to&nbsp;Google Bookmarks" alt="Add to&nbsp;Google Bookmarks" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.mister-wong.com/index.php?action=addurl&amp;bm_url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;bm_description=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Mister Wong"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/misterwong.png" title="Add to&nbsp;Mister Wong" alt="Add to&nbsp;Mister Wong" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.netscape.com/submit/?U=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;T=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Netscape"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/netscape.png" title="Add to&nbsp;Netscape" alt="Add to&nbsp;Netscape" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://reddit.com/submit?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;title=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;reddit"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/reddit.png" title="Add to&nbsp;reddit" alt="Add to&nbsp;reddit" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.stumbleupon.com/submit?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;title=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Stumble Upon"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/stumbleupon.png" title="Add to&nbsp;Stumble Upon" alt="Add to&nbsp;Stumble Upon" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://www.technorati.com/faves?add=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F" rel="nofollow" title="Add to&nbsp;Technorati"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/technorati.png" title="Add to&nbsp;Technorati" alt="Add to&nbsp;Technorati" /></a>
<br />
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://tipd.com/submit.php?url=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F" rel="nofollow" title="Add to&nbsp;Tip'd"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/tipd.png" title="Add to&nbsp;Tip'd" alt="Add to&nbsp;Tip'd" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://twitter.com/home/?status=Check+out+Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit+@+http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F" rel="nofollow" title="Add to&nbsp;Twitter"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/twitter.png" title="Add to&nbsp;Twitter" alt="Add to&nbsp;Twitter" /></a>
<a onclick="window.open(this.href, '_blank', 'scrollbars=yes,menubar=no,height=600,width=750,resizable=yes,toolbar=no,location=no,status=no'); return false;" href="http://myweb2.search.yahoo.com/myresults/bookmarklet?u=http%3A%2F%2Fwww.pacecode.com%2Fblog%2F2008%2F09%2F22%2Fmagic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit%2F&amp;t=Magic+with+htaccess+file+%26%238211%3B+Increase+execution+time%2C+session+expiry+time+and+file+upload+size+limit" rel="nofollow" title="Add to&nbsp;Yahoo My Web"><img class="social_img" src="http://www.pacecode.com/blog/wp-content/plugins/social-bookmarks/images/yahoo.png" title="Add to&nbsp;Yahoo My Web" alt="Add to&nbsp;Yahoo My Web" /></a>
<br />
</div>
</div>
<!-- Social Bookmarks END -->
]]></content:encoded>
			<wfw:commentRss>http://www.pacecode.com/blog/2008/09/22/magic-with-htaccess-file-increase-execution-time-session-expiry-time-and-file-upload-size-limit/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
