<?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>hostgator türkiye &#187; hostgator Cache ayarı</title>
	<atom:link href="http://hostgatorturkey.com/tag/hostgator-cache-ayari/feed/" rel="self" type="application/rss+xml" />
	<link>http://hostgatorturkey.com</link>
	<description>hostgator hakkında yorumlar ve bilgiler</description>
	<lastBuildDate>Tue, 24 Aug 2010 10:27:49 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Hostgator CPU Sorunu Çözümü</title>
		<link>http://hostgatorturkey.com/hostgator-cpu-sorunu-cozumu/</link>
		<comments>http://hostgatorturkey.com/hostgator-cpu-sorunu-cozumu/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 17:08:59 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Hostgator güvenlik]]></category>
		<category><![CDATA[hostgator Cache ayarı]]></category>
		<category><![CDATA[hostgator CPU ayarları]]></category>
		<category><![CDATA[hostgator CPU optimize]]></category>
		<category><![CDATA[hostgator cpu sorunu]]></category>

		<guid isPermaLink="false">http://hostgatorturkey.com/?p=253</guid>
		<description><![CDATA[Website:   http://www.hostgator.com
Hostgator da bildiğiniz gibi 260k ya kadar ziyaretci barındıran siteler bulunmakta. Nasıl oluyorda bu sitelerin hesapları suspend olmazken sizin 10k siteniz kapatılıyor. Burdaki sorun CPU limitini aşmanız. Hostgator daki CPU limiti %25 dir. Bunu aşmadıktan sonra sitenize gelen trafik ne olursa olsun hostgator buna izin verir. Özellikle bu sorun Webloader kullanıcılarında yaşanmaktadır.
Peki [...]]]></description>
			<content:encoded><![CDATA[<p>Website: <strong> <a onclick="parent.location.href='http://secure.hostgator.com/~affiliat/cgi-bin/affiliates/clickthru.cgi?id=hostwho';   return event.returnValue=false" href="http://www.hostgator.com"> http://www.hostgator.com</a></strong></p>
<p><strong><a href="http://hostgatorturkey.com/hostgator.html" target="_blank">Hostgator</a></strong> da bildiğiniz gibi 260k ya kadar ziyaretci barındıran siteler bulunmakta. Nasıl oluyorda bu sitelerin hesapları suspend olmazken sizin 10k siteniz kapatılıyor. Burdaki sorun <strong>CPU limiti</strong>ni aşmanız. <strong>Hostgator</strong> daki CPU limiti %25 dir. Bunu aşmadıktan sonra sitenize gelen trafik ne olursa olsun hostgator buna izin verir. Özellikle bu sorun Webloader kullanıcılarında yaşanmaktadır.</p>
<p>Peki CPU aşmamak için ne yapılmalı? Birkaç çözüm yolu var aslında;</p>
<p>1)Scriptinizi optimize etmelisiniz</p>
<p>2)Rasgele etiket sistemini azaltılmalı, etiket sayfasındaki etiketleride azaltılmalı (hersayfada 40-50 etiket olacak şekilde mesela)</p>
<p>3) global/ust.php yi açıp</p>
<p><code style="white-space: nowrap;"><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;? $etiket</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select * from tag order by rand() limit 60"</span><span style="color: #007700;">);<br />
</span></span></code></code></p>
<p>bölümünü</p>
<p><code style="white-space: nowrap;"><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;? $etiket</span><span style="color: #007700;">=</span><span style="color: #0000bb;">mysql_query</span><span style="color: #007700;">(</span><span style="color: #dd0000;">"select * from tag order by id desc limit 60"</span><span style="color: #007700;">);</span> </span> </code></code></p>
<p>ile değiştirdikten sonra sorun kalmayacaktır. Eğer yüksek hitlerde iseniz &#8220;html cache&#8221; yapmanızda da fayda vardır. Bunun için ise aşağıdaki kodu ust.php nin en üzerine yerleştirin.</p>
<p><code style="white-space: nowrap;"><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;?<br />
$filename </span><span style="color: #007700;">= </span><span style="color: #dd0000;">"%%-"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">md5</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$_SERVER</span><span style="color: #007700;">[</span><span style="color: #dd0000;">'REQUEST_URI'</span><span style="color: #007700;">]).</span><span style="color: #dd0000;">"-%%.html"</span><span style="color: #007700;">;<br />
</span><span style="color: #0000bb;">$cachefile </span><span style="color: #007700;">= </span><span style="color: #dd0000;">"cache/"</span><span style="color: #007700;">.</span><span style="color: #0000bb;">$filename</span><span style="color: #007700;">;<br />
</span><span style="color: #0000bb;">$cachetime </span><span style="color: #007700;">= </span><span style="color: #0000bb;">1 </span><span style="color: #007700;">* </span><span style="color: #0000bb;">60 </span><span style="color: #007700;">* </span><span style="color: #0000bb;">60</span><span style="color: #007700;">; </span><span style="color: #ff8000;">// Cache Süresi<br />
</span><span style="color: #007700;">if (</span><span style="color: #0000bb;">file_exists</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$cachefile</span><span style="color: #007700;">))<br />
{<br />
if(</span><span style="color: #0000bb;">time</span><span style="color: #007700;">() - </span><span style="color: #0000bb;">$cachetime </span><span style="color: #007700;">&lt; </span><span style="color: #0000bb;">filemtime</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$cachefile</span><span style="color: #007700;">))<br />
{<br />
</span><span style="color: #0000bb;">readfile</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$cachefile</span><span style="color: #007700;">);<br />
exit;<br />
}<br />
else<br />
{<br />
</span><span style="color: #0000bb;">unlink</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$cachefile</span><span style="color: #007700;">);<br />
}<br />
}<br />
</span><span style="color: #0000bb;">ob_start</span><span style="color: #007700;">();<br />
</span><span style="color: #0000bb;">?&gt;</span></span></code></code></p>
<p>Aşağıdaki kodu da alt.php nin en altına yerleştiriniz. Sonra Ftp ana dizine cache isimli bir klasör oluşturup chmod 777 değerini veriniz.</p>
<p><code style="white-space: nowrap;"><code><span style="color: #000000;"> <span style="color: #0000bb;">&lt;?<br />
$fp </span><span style="color: #007700;">= </span><span style="color: #0000bb;">fopen</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$cachefile</span><span style="color: #007700;">, </span><span style="color: #dd0000;">'w+'</span><span style="color: #007700;">);<br />
</span><span style="color: #0000bb;">fwrite</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$fp</span><span style="color: #007700;">, </span><span style="color: #0000bb;">ob_get_contents</span><span style="color: #007700;">());<br />
</span><span style="color: #0000bb;">fclose</span><span style="color: #007700;">(</span><span style="color: #0000bb;">$fp</span><span style="color: #007700;">);<br />
</span><span style="color: #0000bb;">ob_end_flush</span><span style="color: #007700;">();<br />
</span><span style="color: #0000bb;">?&gt;</span></span></code></code></p>
<p>Bu seferde &#8220;cache&#8221; klasörü  dolacaktır. O klasörü de saatte bir cron job ile boşaltabilirsiniz. Aşağıdaki kod da cache klasörünü otomatik olarak boşaltmak için gereken cron jobs kodlarıdır:</p>
<p><span style="color: #000080;">rm -fv /home/[I]SİTENİZ[/I]/public_html/cache/*.html</span></p>
<p><span style="color: #000080;"><br />
</span></p>
<p><strong> <a onclick="parent.location.href='http://secure.hostgator.com/cgi-bin/affiliates/clickthru.cgi?id=hostwho';   return event.returnValue=false" href="http://www.hostgator.com"> http://www.hostgator.com</a></strong></p>
<div id="crp_related"><h3>Benzer Yazılar:</h3><ul><li><a href="http://hostgatorturkey.com/hostgator-asp-destegi/" rel="bookmark">Hostgator Asp Desteği</a></li><li><a href="http://hostgatorturkey.com/hostgator-video-anlatim-mysql-database-olusturma/" rel="bookmark">Hostgator Video Anlatım | Mysql Database Oluşturma</a></li><li><a href="http://hostgatorturkey.com/hosting-fiyatlari-yabanci-hosting-firmalari/" rel="bookmark">Hosting Fiyatları - Yabancı Hosting Firmaları</a></li><li><a href="http://hostgatorturkey.com/hostgator-hosting-ve-reseller-paketlerinin-ek-ozellikleri/" rel="bookmark">Hostgator, Hosting ve Reseller Paketlerinin Ek Özellikleri</a></li><li><a href="http://hostgatorturkey.com/hostgator-turkiye-facebook-sayfasi-acildi/" rel="bookmark">Hostgator Türkiye Facebook Sayfası Açıldı!</a></li><li><a href="http://hostgatorturkey.com/hostgator-email-hesabi-acmak/" rel="bookmark">Hostgator Email Hesabı Açmak</a></li><li><a href="http://hostgatorturkey.com/hostgator-reseller/" rel="bookmark">Hostgator Reseller</a></li><li><a href="http://hostgatorturkey.com/hostgator-subdomain-acmak/" rel="bookmark">Hostgator Subdomain Açmak</a></li><li><a href="http://hostgatorturkey.com/hostgator-coupon-code/" rel="bookmark">Hostgator İndirim Kuponları</a></li><li><a href="http://hostgatorturkey.com/hostgator-hosting-paketleri/" rel="bookmark">Hostgator Hosting Paketleri</a></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://hostgatorturkey.com/hostgator-cpu-sorunu-cozumu/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
