<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>PHPDeveloper.org</title>
    <link>http://www.phpdeveloper.org</link>
    <description>Up-to-the Minute PHP News, views and community</description>
    <language>en-us</language>
    <pubDate>Thu, 24 May 2012 10:45:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[PHP.net: PHP 5.3.12 and 5.4.2 and the CGI flaw (CVE-2012-1823)]]></title>
      <guid>http://www.phpdeveloper.org/news/17915</guid>
      <link>http://www.phpdeveloper.org/news/17915</link>
      <description><![CDATA[The PHP.net site as new post with some supplemental information for those users of the PHP CGI that might be effected by the recently announced bug, the reason for the  <a href="http://phpdeveloper.org/news/17907">most recent release</a>. Unfortunately, this patch only fixes some of the cases of the problem, so they've <a href="http://www.php.net/index.php#id2012-05-06-1">amended their instructions</a> to included a more effective mod_rewrite rule to help protect your applications.
</p>
<blockquote>
PHP 5.3.12/5.4.2 do not fix all variations of the CGI issues described in CVE-2012-1823. It has also come to our attention that some sites use an insecure cgiwrapper script to run PHP. These scripts will use $* instead of "$@" to pass parameters to php-cgi which causes a number of issues. Again, people using mod_php or php-fpm are not affected.
</blockquote>
<p>
The rewrite rule is there in the post, ready for copy and pasting into your config. Even if you're running the latest PHP 5.3.12 and 5.4.2., be sure to use this rule as a stop-gap measure for now. Another release is planned for tomorrow to fully correct the CGI flaw.
</p>]]></description>
      <pubDate>Mon, 07 May 2012 09:03:59 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP-Security.net: New PHP-CGI Exploit (CVE-2012-1823)]]></title>
      <guid>http://www.phpdeveloper.org/news/17908</guid>
      <link>http://www.phpdeveloper.org/news/17908</link>
      <description><![CDATA[<p>
The PHP-Security.net site has two posts related to the recently discovered bug in PHP (hence the <a href="http://phpdeveloper.org/news/17907">new versions</a>) related to the CGI handling in certain server configurations. 
</p>
<p>
In <a href="http://www.php-security.net/archives/9-New-PHP-CGI-exploit-CVE-2012-1823,-PoC-exploit.html">the first</a> they detail more of what the bug is, how it could be exploited and link to the <a href="http://eindbazen.net/2012/05/php-cgi-advisory-cve-2012-1823/">original advisory</a> for the problem. Also included are more details on the issue, including sample avenues of attack.
</p>
<p>
In the <a href="http://www.php-security.net/archives/11-Mitigation-for-CVE-2012-1823-CVE-2012-2311.html">second post</a> they look at the recent PHP release and note that it does not completely rid the language of the problem. They point out that the Rewrite rule that's included in their post (not the one on PHP.net) should be used to prevent this issue from effecting your installations.
</p>]]></description>
      <pubDate>Fri, 04 May 2012 08:24:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Anthony Ferrara's Blog: On Optimization in PHP]]></title>
      <guid>http://www.phpdeveloper.org/news/16698</guid>
      <link>http://www.phpdeveloper.org/news/16698</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has a new post to his blog today looking at something that's constantly a focus of user-facing applications, PHP ones or otherwise - <a href="http://blog.ircmaxell.com/2011/08/on-optimization-in-php.html?m=0">application optimization</a>. He specifically discusses handling it in PHP and some things to keep an eye out for.
</p>
<blockquote>
When it comes to optimization, there are two competing viewpoints in the PHP community. Some say that optimization should only ever be an after thought and to avoid premature optimization at all costs. Others will say that this is impractical, and you should make your application fast as you write it, since then you won't have to go back and clean it up to make it faster. While I can understand the viewpoints of both sides, I am firmly in the former category.
</blockquote>
<p>
He talks about the "90/10 Rule" of development (most of the work is done by only a small part of the code) and what that critical 10% could be made of. He also touches on the "60/40 Rule", "instinctual optimization" and the emphasis people put on benchmarks for their tool or framework of choice.
</p>]]></description>
      <pubDate>Wed, 10 Aug 2011 08:35:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[QaFoo.com Blog: Howto write a Rule for PHPMD]]></title>
      <guid>http://www.phpdeveloper.org/news/16072</guid>
      <link>http://www.phpdeveloper.org/news/16072</link>
      <description><![CDATA[<p>
On the QaFoo blog today <i>Manuel Pichler</i> has written up a guide to help you <a href="http://qafoo.com/blog/019_howto_write_custom_rules_for_phpmd.html">write a custom rule</a> to use with the PHP Mess Detector (PHPMD) as extended from some of the current rules (it's always easier to start from examples).
</p>
<blockquote>
Let us start with some architecture basics behind PHPMD. All rules in PHPMD must at least implement the <a href="https://github.com/phpmd/phpmd/blob/master/src/main/php/PHP/PMD/Rule.php">PHP_PMD_Rule</a> interface. You can also extend the abstract rule base class <a href="https://github.com/phpmd/phpmd/blob/master/src/main/php/PHP/PMD/AbstractRule.php">PHP_PMD_AbstractRule</a> which already provides an implementation of all required infrastructure methods and application logic, so that the only task which is left to you is the implementation of the concrete validation code of your rule. 
</blockquote>
<p>
He walks you through some sample code and talks about some of the common interfaces that are available to your testing. He takes one of them, IFunctionAware, and looks at it specifically, showing how to use it to detect and add violations for the validation. He includes an example of writing a rule based on an existing software metric (in this case, the number of public methods). There's also  bit at the end showing how to write a rule based on the "abstract syntax tree" to be able to check just about anything in the code you're looking to test.
</p>]]></description>
      <pubDate>Mon, 21 Mar 2011 09:16:57 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Manuel Pichler's Blog: Howto create custom rule sets for PHPMD]]></title>
      <guid>http://www.phpdeveloper.org/news/14329</guid>
      <link>http://www.phpdeveloper.org/news/14329</link>
      <description><![CDATA[<p>
If you've been using the <a href="http://phpmd.org/about.html">PHP Mess Detector (PHPMD)</a> to help clean up problem areas in your applications, but have needed more than just the basic rules that it comes with, you're in luck. <i>Manuel Pichler</i> has put together a new post for his blog about <a href="http://manuel-pichler.de/archives/84-Howto-create-custom-rule-sets-for-PHPMD.html">creating custom rules sets</a> for the tool.
</p>
<blockquote>
PHPMD can be seen as an one level down/low level equivalent to <a href="http://pear.php.net/package/PHP_CodeSniffer">PHP_CodeSniffer</a>. It is a simple command line tool that can be used to check your application's source code for possible bugs, suboptimal or overcomplicated code. The current release of <a href="http://phpmd.org/about.html">PHPMD</a> ships with three default rule sets. 
</blockquote>
<p>
The first deals with code size, the second checks for unused variables and the like and the third looks at naming conventions. He shows how to take one of the structures from one of these three and create a new rule. For his example it's a measurement of <a href="http://phpmd.org/rules/codesize.html#cyclomaticcomplexity">cyclomatic complexity</a>. He also shows you how to exclude certain rules that might come in another set so you don't have to completely redefine to use pre-existing rules.
</p>
<p>
The latest release of PHPMD can be pulled from <a href="http://pear.phpmd.org/">pear.phpmd.org</a> or from its <a href="http://github.com/manuelpichler/phpmd">github repository</a>.
</p>]]></description>
      <pubDate>Fri, 09 Apr 2010 13:19:25 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Stefan Koopmanschap's Blog: Serving frontend and backend from the same document root with symfony ]]></title>
      <guid>http://www.phpdeveloper.org/news/12204</guid>
      <link>http://www.phpdeveloper.org/news/12204</link>
      <description><![CDATA[<p>
<i>Stefan Koopmanschap</i> has <a href="http://www.leftontheweb.com/message/Serving_frontend_and_backend_from_the_same_document_root_with_symfony">a recent post</a> to his blog about a small oversight (and gotcha other symfony developers should watch for) that he's made a few times when trying to work with a subdomain of his main symfony-powered website:
</p>
<blockquote>
Quite often have I been staring at my virtualhost setup for the admin subdomain of this application, wondering why the hell it kept serving the frontend. I'd set the DirectoryIndex to backend.php, so why did it keep serving the frontend?
</blockquote>
<p>
The culprit was something that's usually one of the first things set up when you load a new framework - the mod_rewrite rules in an .htaccess. Of course, since they were the default, things would get routed back to "index.php" instead of his "backend.php" as he wanted. To fix it, he moved these options out of the .htaccess and into the virtualhost configuration.
</p>]]></description>
      <pubDate>Wed, 25 Mar 2009 09:31:45 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Chris Hartjes' Blog: CakePHP + Nginx Configuration Update]]></title>
      <guid>http://www.phpdeveloper.org/news/11814</guid>
      <link>http://www.phpdeveloper.org/news/11814</link>
      <description><![CDATA[<p>
<a href="http://www.littlehart.net/atthekeyboard/2009/01/25/cakephp-nginx-configuration-update/">In this new post</a> from <i>Chris Hartjes</i> today he continues his look at combining a CakePHP application with the <a href="http://nginx.net/">Nginx</a> web server. This time the focus is on the configuration of the web server side of things to make the CakePHP routing work.
</p>
<blockquote>
I'm in the process of creating the website for my upcoming book *and* had recently switched back from using Apache to using Nginx again, so I thought it might be time to roll up my sleeves and figure out how to make it work in a subdirectory. After much gnashing of teeth and pissing and moaning, I figured it out. 
</blockquote>
<p>
A simple configuration example <a href="http://www.littlehart.net/atthekeyboard/2009/01/25/cakephp-nginx-configuration-update/">is included</a> as a part of the post showing how to correctly configure the rewrite routes to catch everything and send it back to the index.php file. His is a two-part process: it tries to match anything with "/foo" in it then, if it wasn't caught there, it sends it off to be rerouted to the front controller.
</p>]]></description>
      <pubDate>Mon, 26 Jan 2009 10:21:57 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[SaniSoft Blog: Multiple validation rules per model field while baking]]></title>
      <guid>http://www.phpdeveloper.org/news/10070</guid>
      <link>http://www.phpdeveloper.org/news/10070</link>
      <description><![CDATA[<p>
If you're a CakePHP user and have been frustrated by how this "bake" functionality doesn't allow for more than one validation rule on a given field, check out <a href="http://www.sanisoft.com/blog/2008/04/29/multiple-validation-rules-per-model-field-while-baking/">the new post</a> on the SaniSoft blog (from <i>Amit Badkas</i>):
</p>
<blockquote>
This is not much of a problem if you have only a few models but when you start to work on several dozen models in a project it becomes very tedious to open each and every model file to make changes.
</blockquote>
<p>
The result of his frustration has come out in the form of a <a href="https://trac.cakephp.org/attachment/ticket/3959/model.php.patch.txt">patch</a> as a part of a new ticket in the CakePHP request submission process.
</p>]]></description>
      <pubDate>Tue, 29 Apr 2008 16:12:44 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Elizabeth Naramore's Blog: PHP Throwdown Updates]]></title>
      <guid>http://www.phpdeveloper.org/news/6823</guid>
      <link>http://www.phpdeveloper.org/news/6823</link>
      <description><![CDATA[<p>
<i>Elizabeth Naramore</i> has <a href="http://naramore.net/blog/index.php?p=97">posted an update</a> about the <a href="http://phpthrowdown.com">PHP Throwdown</a> event being planned, including updates on the judges, prizes, sponsors, and registration.
</p>
<blockquote>
Many people probably think the PHP Throwdown has stalled, but it's quite the contrary actually. We've been mulling over many things and have come to some conclusions. So if you're interested, read on!
</blockquote>
<p>
The judges <a href="http://phpthrowdown.com/?page_id=5">have been found</a>, the categories are still being decided, prizes are en route, <a href="http://jupiterhosting.com/">Jupiter Hosting</a> has stepped up as a sponsor for the event, registration is coming soon, and <a href="http://phpthrowdown.com/?page_id=2">the rules</a> have been posted. 
</p>
<p>
Be sure to check out <a href="http://phpthrowdown.com/">the main page</a> for complete details on the event. The PHP Throwdown is a competition to see what can be accomplished with PHP in 24 hours.
Who: You! You can compete in a team, or individually.
</p>]]></description>
      <pubDate>Tue, 05 Dec 2006 08:34:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[True Hacker! Blog: Digg style clean URLs with PHP and Apache]]></title>
      <guid>http://www.phpdeveloper.org/news/6790</guid>
      <link>http://www.phpdeveloper.org/news/6790</link>
      <description><![CDATA[<p>
The 'true hacker!' blog has <a href="http://truehacker.blogspot.com/2006/11/digg-style-clean-urls-with-php-and.html">a new post</a> today that gives you a quick four step process for creating some clean, Digg-style URLs for your site with some simple Apache configuration changes (mod_rewrite).
</p>
<blockquote>
You might have noticed that Digg has a cool way of maintaining clean URLs. Digg actually uses LAMP - Linux/Apache/MySQL/PHP. But where are the .php extensions? The answer is here. 4 steps to implement your own Digg style clean URLs.
</blockquote>
<p>
<a href="http://truehacker.blogspot.com/2006/11/digg-style-clean-urls-with-php-and.html">His method</a> turns on Apache's rewrite engine (you do have mod_rewrite enabled, don't you?) and adds a rule to push all of the requests to two default PHP files. There's also a ForceType method that can be used to achieve the same effect. One .htaccess file later, you're in business and the PHP script only needs to access the $_SERVER['REQUEST_URI'] value to get the parameters.
</p>]]></description>
      <pubDate>Wed, 29 Nov 2006 09:57:00 -0600</pubDate>
    </item>
  </channel>
</rss>

