<?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" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:series="http://unfoldingneurons.com/" > <channel><title>Comments on: Configuring PHP: Essential INI Settings</title> <atom:link href="http://www.brandonsavage.net/essential-ini-settings/feed/" rel="self" type="application/rss+xml" /><link>http://www.brandonsavage.net/essential-ini-settings/</link> <description>The personal blog of Brandon Savage. Contains entries of a personal and professional nature focusing on PHP, Apple, LAMP, MySQL and Washington, DC.</description> <lastBuildDate>Thu, 29 Jul 2010 19:10:45 +0000</lastBuildDate> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.0.1</generator> <item><title>By: pgl</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-2645</link> <dc:creator>pgl</dc:creator> <pubDate>Thu, 10 Dec 2009 14:43:11 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-2645</guid> <description>Also, IMO: it&#039;s disingenuous, in an article about modifying php.ini settings, to suggest that a reason for turning off short_tags is that you might one day move to a host where you can&#039;t _modify php.ini settings_.</description> <content:encoded><![CDATA[<p>Also, IMO: it&#8217;s disingenuous, in an article about modifying php.ini settings, to suggest that a reason for turning off short_tags is that you might one day move to a host where you can&#8217;t _modify php.ini settings_.</p> ]]></content:encoded> </item> <item><title>By: pgl</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-2644</link> <dc:creator>pgl</dc:creator> <pubDate>Thu, 10 Dec 2009 14:40:03 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-2644</guid> <description>&quot;magic_quotes_gpc offers NO security&quot; - well, no, that&#039;s not true. It does. It&#039;s just not enough to rely on.</description> <content:encoded><![CDATA[<p>&#8220;magic_quotes_gpc offers NO security&#8221; &#8211; well, no, that&#8217;s not true. It does. It&#8217;s just not enough to rely on.</p> ]]></content:encoded> </item> <item><title>By: Samuel Folkes</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1408</link> <dc:creator>Samuel Folkes</dc:creator> <pubDate>Tue, 29 Sep 2009 20:06:24 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1408</guid> <description>P.S. Loving The Beginner Pattern series Brandon ;)</description> <content:encoded><![CDATA[<p>P.S. Loving The Beginner Pattern series Brandon ;)</p> ]]></content:encoded> </item> <item><title>By: Samuel Folkes</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1407</link> <dc:creator>Samuel Folkes</dc:creator> <pubDate>Tue, 29 Sep 2009 20:05:30 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1407</guid> <description>RE: the short_open_tag setting, I have never ever heard a GOOD reason for using short_open_tags. Taco&#039;s argument for leaving them enabled in php.ini is a fairly good one. However, enforcing coding standards with your team pretty much rids you of that problem. Three extra characters i&#039;m sure won&#039;t kill anyone.Another bothersome php.ini setting is safe_mode. I&#039;ve had many complaints about a WordPress plugin I wrote not functioning correctly only to find on investigation that safe_mode was set to ON on the server in question and was causing conflicts with cURL. I think that&#039;s another setting we should set to off in order to avoid weird errors popping up. Its deprecated in PHP 5.3 and set to be removed altogether from PHP 6.0.</description> <content:encoded><![CDATA[<p>RE: the short_open_tag setting, I have never ever heard a GOOD reason for using short_open_tags. Taco&#8217;s argument for leaving them enabled in php.ini is a fairly good one. However, enforcing coding standards with your team pretty much rids you of that problem. Three extra characters i&#8217;m sure won&#8217;t kill anyone.</p><p>Another bothersome php.ini setting is safe_mode. I&#8217;ve had many complaints about a WordPress plugin I wrote not functioning correctly only to find on investigation that safe_mode was set to ON on the server in question and was causing conflicts with cURL. I think that&#8217;s another setting we should set to off in order to avoid weird errors popping up. Its deprecated in PHP 5.3 and set to be removed altogether from PHP 6.0.</p> ]]></content:encoded> </item> <item><title>By: Taco</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1382</link> <dc:creator>Taco</dc:creator> <pubDate>Mon, 28 Sep 2009 14:29:27 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1382</guid> <description>Needless to say we do have commit hooks preventing us committing short open tags ;)</description> <content:encoded><![CDATA[<p>Needless to say we do have commit hooks preventing us committing short open tags ;)</p> ]]></content:encoded> </item> <item><title>By: Brandon Savage</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1381</link> <dc:creator>Brandon Savage</dc:creator> <pubDate>Mon, 28 Sep 2009 13:47:06 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1381</guid> <description>The PHP manual doesn&#039;t indicate that they are deprecated. However, the PHP manual DOES indicate that they are not suggested for use (which is why I wrote about them here).</description> <content:encoded><![CDATA[<p>The PHP manual doesn&#8217;t indicate that they are deprecated. However, the PHP manual DOES indicate that they are not suggested for use (which is why I wrote about them here).</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1380</link> <dc:creator>David</dc:creator> <pubDate>Mon, 28 Sep 2009 13:42:06 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1380</guid> <description>Aren&#039;t short tags being removed in PHP6 though? Or is that not confirmed yet?</description> <content:encoded><![CDATA[<p>Aren&#8217;t short tags being removed in PHP6 though? Or is that not confirmed yet?</p> ]]></content:encoded> </item> <item><title>By: Brandon Savage</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1379</link> <dc:creator>Brandon Savage</dc:creator> <pubDate>Mon, 28 Sep 2009 13:37:56 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1379</guid> <description>Taco, that&#039;s a fair point. My only counter would be that if you&#039;re exceedingly vigilant about having things like post-commit hooks and QA teams, you can generally avoid a slip-up like that from ending up on production.I like PHP CodeSniffer. Matthew Turland does a great job of explaining how to create these hooks: http://blueparabola.com/blog/subversion-commit-hooks-php</description> <content:encoded><![CDATA[<p>Taco, that&#8217;s a fair point. My only counter would be that if you&#8217;re exceedingly vigilant about having things like post-commit hooks and QA teams, you can generally avoid a slip-up like that from ending up on production.</p><p>I like PHP CodeSniffer. Matthew Turland does a great job of explaining how to create these hooks: <a href="http://blueparabola.com/blog/subversion-commit-hooks-php" rel="nofollow">http://blueparabola.com/blog/subversion-commit-hooks-php</a></p> ]]></content:encoded> </item> <item><title>By: Taco</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1378</link> <dc:creator>Taco</dc:creator> <pubDate>Mon, 28 Sep 2009 13:35:09 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1378</guid> <description>Hey Brandon,Regarding the short open tag: I&#039;d let people decide for themselves whether or not to use it (not everyone needs to be able to run their code on a different server). But even if someone decides to only use the &#039;long&#039; tag (like our team does) I&#039;d still encourage them to set the short_open_tag setting _on_ on production servers and off on development servers.This will ensure that when you accidentally upload code with a short open tag (i.e. third party code or a typo) it will not be served as html and thus be visible to visitors.</description> <content:encoded><![CDATA[<p>Hey Brandon,</p><p>Regarding the short open tag: I&#8217;d let people decide for themselves whether or not to use it (not everyone needs to be able to run their code on a different server). But even if someone decides to only use the &#8216;long&#8217; tag (like our team does) I&#8217;d still encourage them to set the short_open_tag setting _on_ on production servers and off on development servers.</p><p>This will ensure that when you accidentally upload code with a short open tag (i.e. third party code or a typo) it will not be served as html and thus be visible to visitors.</p> ]]></content:encoded> </item> <item><title>By: Shaun</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1377</link> <dc:creator>Shaun</dc:creator> <pubDate>Mon, 28 Sep 2009 11:53:31 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1377</guid> <description>I would also recommend that you keep display_startup_errors to 0 in production but to 1 in developmentdisplay_startup_errors - Even when display_errors is on, errors that occur during PHP&#039;s startup sequence are not displayed. It&#039;s strongly recommended to keep display_startup_errors off, except for debugging.Another good post would be to show the .ini directives (PHP_INI_PERDIR, PHP_INI_ALL, PHP_INI_SYSTEM) @ http://ie.php.net/manual/en/ini.list.php</description> <content:encoded><![CDATA[<p>I would also recommend that you keep display_startup_errors to 0 in production but to 1 in development</p><p>display_startup_errors &#8211; Even when display_errors is on, errors that occur during PHP&#8217;s startup sequence are not displayed. It&#8217;s strongly recommended to keep display_startup_errors off, except for debugging.</p><p>Another good post would be to show the .ini directives (PHP_INI_PERDIR, PHP_INI_ALL, PHP_INI_SYSTEM) @<br /> <a href="http://ie.php.net/manual/en/ini.list.php" rel="nofollow">http://ie.php.net/manual/en/ini.list.php</a></p> ]]></content:encoded> </item> <item><title>By: Brandon Savage</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1376</link> <dc:creator>Brandon Savage</dc:creator> <pubDate>Mon, 28 Sep 2009 10:17:32 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1376</guid> <description>Hey Markus, thanks for your thoughts.The reason that I suggested the user turn off the short tags has more to do with shrinking the toolbag. I&#039;ve actually run into the short tag issue with XML (I had to have PHP parsed in a .xml file once and I spent hours fighting with it). By simply advising them to turn it off, if they do, they won&#039;t be tempted to use it later because it won&#039;t be available to them.There are lots of people that stand by the short tag. I see their reasons, and I don&#039;t think they&#039;re necessarily bad for it. However, the biggest reason why I think this is a bad idea is that it creates a portability problem: if another host disables short tags, their code won&#039;t work. Trust me, I&#039;ve experienced this too.I&#039;ll add more of an explanation so as to not be so patronizing. Hope that helps explain more of my thinking. :-)</description> <content:encoded><![CDATA[<p>Hey Markus, thanks for your thoughts.</p><p>The reason that I suggested the user turn off the short tags has more to do with shrinking the toolbag. I&#8217;ve actually run into the short tag issue with XML (I had to have PHP parsed in a .xml file once and I spent hours fighting with it). By simply advising them to turn it off, if they do, they won&#8217;t be tempted to use it later because it won&#8217;t be available to them.</p><p>There are lots of people that stand by the short tag. I see their reasons, and I don&#8217;t think they&#8217;re necessarily bad for it. However, the biggest reason why I think this is a bad idea is that it creates a portability problem: if another host disables short tags, their code won&#8217;t work. Trust me, I&#8217;ve experienced this too.</p><p>I&#8217;ll add more of an explanation so as to not be so patronizing. Hope that helps explain more of my thinking. :-)</p> ]]></content:encoded> </item> <item><title>By: Brandon Savage</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1375</link> <dc:creator>Brandon Savage</dc:creator> <pubDate>Mon, 28 Sep 2009 10:12:32 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1375</guid> <description>Maarten, the license I use allows for translation or reuse with attribution. It prohibits commercial use.</description> <content:encoded><![CDATA[<p>Maarten, the license I use allows for translation or reuse with attribution. It prohibits commercial use.</p> ]]></content:encoded> </item> <item><title>By: kodegeek</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1374</link> <dc:creator>kodegeek</dc:creator> <pubDate>Mon, 28 Sep 2009 09:55:50 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1374</guid> <description>Three more things i want to reffer to enable them mod_rewrite module to ON php curl extension to ON php gd2 extension to Onas they are frequently used. I don&#039;t agree with you about to turn off short open tag although it is highly recommended not to use that tag.Thanks for the nice post!</description> <content:encoded><![CDATA[<p>Three more things i want to reffer to enable them<br /> mod_rewrite module to ON<br /> php curl extension to ON<br /> php gd2 extension to On</p><p> as they are frequently used. I don&#8217;t agree with you about to turn off short open tag although it is highly recommended not to use that tag.</p><p>Thanks for the nice post!</p> ]]></content:encoded> </item> <item><title>By: Markus Wolff</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1372</link> <dc:creator>Markus Wolff</dc:creator> <pubDate>Mon, 28 Sep 2009 07:56:03 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1372</guid> <description>Hey Brandon, while I greatly respect you and applaud you taking the time to write entries targeted at beginners to help them out, I have two gripes with this one, both regarding the advice on short_open_tag:1. you say it&#039;s bad form to use it, and advise to just turn it off and leave it that way. IMHO, that&#039;s bad form by itself: You are effectively patronizing the reader by just telling them what they should not do, but you don&#039;t provide any explanation.2. that said, I&#039;d be interested in your explanation on that one - can you provide a real-world example, something that may actually be found in the wild, where short open tags are a bad idea? Most people tend to argue about breaking XML validation, but I have never, ever encountered anyone actually trying to parse or validate XML with embedded PHP in it. Whenever someone actually embeds PHP within XML, the file is usually run through PHP first and the XML parser will get the generated content. So IMHO this argument is invalid because 99% of all users will never want to use XML this way and it is silly to have all PHP developers clutter their templates with &quot;&lt;?php echo ...&quot; where a &quot;&lt;?=&quot; would suffice, just so that the (probably even less than) 1% of the XML purity zealots are happy.Just my $0.02 ;-)</description> <content:encoded><![CDATA[<p>Hey Brandon, while I greatly respect you and applaud you taking the time to write entries targeted at beginners to help them out, I have two gripes with this one, both regarding the advice on short_open_tag:</p><p>1. you say it&#8217;s bad form to use it, and advise to just turn it off and leave it that way. IMHO, that&#8217;s bad form by itself: You are effectively patronizing the reader by just telling them what they should not do, but you don&#8217;t provide any explanation.</p><p>2. that said, I&#8217;d be interested in your explanation on that one &#8211; can you provide a real-world example, something that may actually be found in the wild, where short open tags are a bad idea? Most people tend to argue about breaking XML validation, but I have never, ever encountered anyone actually trying to parse or validate XML with embedded PHP in it. Whenever someone actually embeds PHP within XML, the file is usually run through PHP first and the XML parser will get the generated content. So IMHO this argument is invalid because 99% of all users will never want to use XML this way and it is silly to have all PHP developers clutter their templates with &#8220;&lt;?php echo &#8230;&quot; where a &quot;&lt;?=&quot; would suffice, just so that the (probably even less than) 1% of the XML purity zealots are happy.</p><p>Just my $0.02 ;-)</p> ]]></content:encoded> </item> <item><title>By: David</title><link>http://www.brandonsavage.net/essential-ini-settings/#comment-1371</link> <dc:creator>David</dc:creator> <pubDate>Mon, 28 Sep 2009 07:27:45 +0000</pubDate> <guid isPermaLink="false">http://www.brandonsavage.net/?p=769#comment-1371</guid> <description>Setting PHP directives in .htaccess files only works with mod_php, which a lot of hosts don&#039;t use because of security issues. If you&#039;re using cgi/fcgi, you&#039;ll need to have a custom php.ini file on a per directory basis.Good write-up though. I was a bit surprised by the gc_maxlifetime value you use, but I guess it depends on your application.</description> <content:encoded><![CDATA[<p>Setting PHP directives in .htaccess files only works with mod_php, which a lot of hosts don&#8217;t use because of security issues. If you&#8217;re using cgi/fcgi, you&#8217;ll need to have a custom php.ini file on a per directory basis.</p><p>Good write-up though. I was a bit surprised by the gc_maxlifetime value you use, but I guess it depends on your application.</p> ]]></content:encoded> </item> </channel> </rss>
<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk
Page Caching using apc (user agent is rejected)
Database Caching 44/52 queries in 0.040 seconds using disk

Served from: www.brandonsavage.net @ 2010-09-08 13:18:38 -->