<?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>Mahmoud M. Abdel-Fattah &#187; PHP</title>
	<atom:link href="http://mahmoud.abdel-fattah.net/tag/php/feed/" rel="self" type="application/rss+xml" />
	<link>http://mahmoud.abdel-fattah.net</link>
	<description>My Personal Website / Blog</description>
	<lastBuildDate>Sat, 07 Jan 2012 09:08:56 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Preventing Joomla! from sending no-cache in headers</title>
		<link>http://mahmoud.abdel-fattah.net/2011/11/25/preventing-joomla-from-sending-no-cache-in-headers/</link>
		<comments>http://mahmoud.abdel-fattah.net/2011/11/25/preventing-joomla-from-sending-no-cache-in-headers/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 01:32:34 +0000</pubDate>
		<dc:creator>Mahmoud M. Abdel-Fattah</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[Joomla]]></category>
		<category><![CDATA[nginx]]></category>
		<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://mahmoud.abdel-fattah.net/?p=535</guid>
		<description><![CDATA[If you are using Joomla! 1.5+ and trying to cache with nginx or other caching server and at same time you don&#8217;t want to use Joomla! system cache plugin. You&#8217;ll [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Mahmoud+M.+Abdel-Fattah&link=http%3A%2F%2Fmahmoud.abdel-fattah.net%2F2011%2F11%2F25%2Fpreventing-joomla-from-sending-no-cache-in-headers%2F&title=Preventing+Joomla%21+from+sending+no-cache+in+headers&desc=If+you+are+using+Joomla%21+1.5%2B+and+trying+to+cache+with+nginx+or+other+caching+server+and+at+same+time+you+don%27t+want+to+use+Joomla%21+system+cache+plugin.+You%27ll+face+a+big+problem%2C+that+Joomla%21+is+send&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>If you are using Joomla! 1.5+ and trying to cache with nginx or other caching server and at same time you don&#8217;t want to use Joomla! system cache plugin. You&#8217;ll face a big problem, that Joomla! is sending &#8220;Cache-Control: no-cache&#8221; and &#8220;Pragma: no-cache&#8221; in response headers.</p>
<p>Here&#8217;s the solution :</p>
<p>1. Edit the following file :
<pre class="brush: plain; title: ; notranslate">Joomla root/libraries/joomla/environment/response.php</pre>
<p>2. Search for the following code :</p>
<pre class="brush: php; title: ; notranslate">
if (self::allowCache() === false) {
self::setHeader('Cache-Control', 'no-cache', false);
// HTTP 1.0
self::setHeader('Pragma', 'no-cache');
}
</pre>
<p>3. Comment this if condition, to be as follows</p>
<pre class="brush: php; title: ; notranslate">
/*
if (self::allowCache() === false) {
self::setHeader('Cache-Control', 'no-cache', false);
// HTTP 1.0
self::setHeader('Pragma', 'no-cache');
}
*/
</pre>
<p>Now, you can disable Joomla! caching, and run whatever caching server, as nginx.</p>
<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Mahmoud+M.+Abdel-Fattah&link=http%3A%2F%2Fmahmoud.abdel-fattah.net%2F2011%2F11%2F25%2Fpreventing-joomla-from-sending-no-cache-in-headers%2F&title=Preventing+Joomla%21+from+sending+no-cache+in+headers&desc=If+you+are+using+Joomla%21+1.5%2B+and+trying+to+cache+with+nginx+or+other+caching+server+and+at+same+time+you+don%27t+want+to+use+Joomla%21+system+cache+plugin.+You%27ll+face+a+big+problem%2C+that+Joomla%21+is+send&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>]]></content:encoded>
			<wfw:commentRss>http://mahmoud.abdel-fattah.net/2011/11/25/preventing-joomla-from-sending-no-cache-in-headers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PHP Coding Standards</title>
		<link>http://mahmoud.abdel-fattah.net/2009/01/01/php-coding-standards/</link>
		<comments>http://mahmoud.abdel-fattah.net/2009/01/01/php-coding-standards/#comments</comments>
		<pubDate>Wed, 31 Dec 2008 23:32:11 +0000</pubDate>
		<dc:creator>Mahmoud M. Abdel-Fattah</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Beginners]]></category>
		<category><![CDATA[Coding]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Standards]]></category>

		<guid isPermaLink="false">http://mahmoud.abdel-fattah.net/?p=128</guid>
		<description><![CDATA[I&#8217;d been writing PHP Code for about 5 years ago !! at 1st I started by some short tutorials then went for trial &#38; error and ofcourse the help of [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Mahmoud+M.+Abdel-Fattah&link=http%3A%2F%2Fmahmoud.abdel-fattah.net%2F2009%2F01%2F01%2Fphp-coding-standards%2F&title=PHP+Coding+Standards&desc=I%27d+been+writing+PHP+Code+for+about+5+years+ago+%3A%29+%21%21+at+1st+I+started+by+some+short+tutorials+then+went+for+trial+%26amp%3B+error+and+ofcourse+the+help+of+Waleed+Gad%2C+later+on+I+started+to+read+many+book&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>I&#8217;d been writing PHP Code for about 5 years ago <img src='http://mahmoud.abdel-fattah.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  !! at 1st I started by some short tutorials then went for trial &amp; error and ofcourse the help of Waleed Gad, later on I started to read many books and my Programming level started to be near professional , but each time I was looking for coding standards. 2 days ago by chance I did a search and I found a lot of useful links that I wanted to share with you !</p>
<ol>
<li><a href="http://cvs.php.net/viewvc.cgi/php-src/CODING_STANDARDS?revision=1.32.4.3.2.1.2.3&amp;view=markup" target="_blank">PHP Coding Standards text file (Found on their CVS)</a></li>
<li><a href="http://pear.php.net/manual/en/standards.php" target="_blank">PEAR coding standards</a></li>
<li><a href="http://framework.zend.com/manual/en/coding-standard.html" target="_blank">Zend Framework coding standard</a></li>
<li><a href="http://typo3.org/documentation/document-library/core-documentation/doc_core_cgl/4.1.0/view/1/6/" target="_blank">Typo3 general php practices</a></li>
<li><a href="http://wordpress.org/docs/developer/coding-style/" target="_blank">WordPress coding style guidelines</a></li>
<li><a href="http://area51.phpbb.com/docs/coding-guidelines.html" target="_blank">phpbb3 group coding guidelines</a></li>
<li><a href="http://www.buxaprojects.com/en/php_coding_guidelines.htm" target="_blank">Buxaprojects php coding guidelines</a></li>
<li><a href="http://www.evolt.org/article/PHP_coding_guidelines/18/60247/index.html" target="_blank">evolt.org php coding guidelines</a></li>
<li><a href="http://www.blackgate.net/consulting/php_coding_guidelines.html" target="_blank">BlackGate php coding guidelines</a></li>
<li><a href="http://www.blueshoes.org/en/developer/coding_guidelines/" target="_blank">Blueshoes coding guidelines</a></li>
<li><a href="http://openclinic.sourceforge.net/openclinic/coding_guidelines.html" target="_blank">OpenClinic coding guidelines</a></li>
</ol>
<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Mahmoud+M.+Abdel-Fattah&link=http%3A%2F%2Fmahmoud.abdel-fattah.net%2F2009%2F01%2F01%2Fphp-coding-standards%2F&title=PHP+Coding+Standards&desc=I%27d+been+writing+PHP+Code+for+about+5+years+ago+%3A%29+%21%21+at+1st+I+started+by+some+short+tutorials+then+went+for+trial+%26amp%3B+error+and+ofcourse+the+help+of+Waleed+Gad%2C+later+on+I+started+to+read+many+book&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=&twrelated1=&twrelated2=&twctr=1&lnkdshow=noshow&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=1&diggbutton=1&diggctr=1&stblbutton=1&stblctr=1&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>]]></content:encoded>
			<wfw:commentRss>http://mahmoud.abdel-fattah.net/2009/01/01/php-coding-standards/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

