<?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>Mon, 20 May 2013 01:46:45 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Hasin Hayder: Running Zend Framework Applications in AppFog]]></title>
      <guid>http://www.phpdeveloper.org/news/18751</guid>
      <link>http://www.phpdeveloper.org/news/18751</link>
      <description><![CDATA[<p>
<i>Hasin Hayder</i> has a quick post to his blog today about how you can <a href="http://hasin.me/2012/11/15/running-zend-framework-applications-in-appfog/">configure an AppFog instance</a> to be able to run Zend Framework-based projects on them.
</p>
<blockquote>
<a href="http://appfog.com/">AppFog</a> is quite a popular polyglot PaaS (Platform as a Service) provider and it comes with a generous free plan for the developers. [...] Recently, I was looking for a solution on how to host a Zend Framework based application in AppFog. The main problem was that the url must point to the /public folder inside the app and  from there it is initialized.  After searching for some time, I found the clue in AppFog's doumentation which is you'll have to redirect all the traffic from the parent domain to the /public/index.php file using the URL rewrite rules.
</blockquote>
<p>
The rewrite rules are included in the post for easy cut-and-pasting. With the recently announced closing of their <a href="http://phpfog.com">phpFog</a> service (in favor of just supporting AppFog) I'm sure this tip could come in handy for a lot of developers out there.
</p>]]></description>
      <pubDate>Thu, 15 Nov 2012 09:28:30 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Joshua Thijssen's Blog: Symfony2: Implementing ACL rules in your Data Fixtures]]></title>
      <guid>http://www.phpdeveloper.org/news/18175</guid>
      <link>http://www.phpdeveloper.org/news/18175</link>
      <description><![CDATA[<p>
<i>Joshua Thijssen</i> has a new post to his blog looking at a method for <a href="http://www.adayinthelifeof.nl/2012/07/04/symfony2-implementing-acl-rules-in-your-data-fixtures/">setting up ACL rules in fixtures</a> for your Symfony2-based applications.
</p>
<blockquote>
Doctrine's DataFixtures are a great way to add test data to your application. It's fairly easy to get this going: Create a fixureLoader that extends DoctrineCommonDataFixturesAbstractFixture, had a load() method and off you go. However, sometimes you want your data also to be protected by Symfony 2&#8242;s ACL layer. Since there isn't a common way to do this, here is one way on how I implemented this.
</blockquote>
<p>
His method uses the ContainerAware interface on the fixture loader instance to be able to get at the container for the fixture. This allows you to use the usual ACL handling methods of the framework to provide restrictions based on things like usernames and roles.
</p>]]></description>
      <pubDate>Wed, 04 Jul 2012 16:33:23 -0500</pubDate>
    </item>
    <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>
  </channel>
</rss>
