<?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, 21 Aug 2008 18:25:49 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Mark Kimsal's Blog: Is Your MVC MIA When it Comes to 404s?]]></title>
      <guid>http://www.phpdeveloper.org/news/10558</guid>
      <link>http://www.phpdeveloper.org/news/10558</link>
      <description><![CDATA[<p>
In a new post to his blog, <i>Michael Kimsal</i> points out a post from his brother (<i>Mark</i>) that <a href="http://cognifty.com/index.php/blog.entry/id=8/is_your_mvc_mia_when_it_comes_to_404s.html">wonders if your framework</a> handles 404 errors the best/most useful way it can.
</p>
<blockquote>
This post is about the consistency of frameworks. Consistency is key to a low learning curve. [...] Yesterday, my brother asked me how he could capture 404 errors in Cognifty, as he was building an app that relied on dealing with random URL patterns. [...] After talking for a bit, we decided that handing off the request to a standard service (or controller) was the best way to handle this type of "error". He started searching to see if other frameworks had a consistent, or at least documented, way of dealing with missing controllers.
</blockquote>
<p>
In his research he found one framework - the Zend Framework - that handed them by default as an error and passed them off to that handler. <i>Mark</i> notes that, depending on your frame of reference, this may or may not be considered a true error. 
</p>
<p>
His Cognifty framework handles things a bit differently. It allows you to change the presentation handler to redirect to another url if an error like a 404 is thrown - a technically "more correct" way of handling things.
</p>]]></description>
      <pubDate>Tue, 08 Jul 2008 07:51:20 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP in Action Blog: Flash Messages]]></title>
      <guid>http://www.phpdeveloper.org/news/10323</guid>
      <link>http://www.phpdeveloper.org/news/10323</link>
      <description><![CDATA[<p>
On the PHP in Action blog <i>Dagfinn Reiersol</i> <a href="http://www.reiersol.com/blog/1_php_in_action/archive/41_flash_messages.html">shares a method</a> to send messages across a POST request that's followed by a redirect (versus a simple GET where it can be in the URL).
</p>
<blockquote>
When processing a GET request, you can display whatever messages you want. The most simplistic way is to echo them directly; or if just slightly more sophisticated, set it in the template that's about to become the web page. When processing a POST request that is to be followed by a redirect, you can't do that. The response (redirect) sent back to the browser does not have any text or HTML content.
</blockquote>
<p>
He points out two different ways to handle the problem - either manually append the message to the URL you're redirecting to or (a bit better method) store it in a session variable and remove it once its done. Several frameworks call this a "flash message". He gives examples of how to set this in two popular frameworks - <a href="http://framework.zend.com">Zend Framework</a> and <a href="http://cakephp.org">CakePHP</a>.
</p>]]></description>
      <pubDate>Mon, 02 Jun 2008 13:44:50 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[CyberInsecure.com: Half-Million Sites Mostly Running PHPBB Forum Software Hacked In Latest Attack]]></title>
      <guid>http://www.phpdeveloper.org/news/10175</guid>
      <link>http://www.phpdeveloper.org/news/10175</link>
      <description><![CDATA[<p>
According to the CyberInsecure.com website around a half-million websites running PHPBB <a href="http://cyberinsecure.com/half-million-sites-mostly-running-phpbb-forum-software-hacked-in-latest-attack/">were hacked</a> in a large coordinated effort.
</p>
<blockquote>
More than half a million websites have been compromised in a new round of attacks that hacked domains in order to infect unsuspecting users' PCs with a variety of trojans. This ongoing campaign includes new malware hosting domains and new trojans variations. All of the sites are running older or misconfigured versions of "phpBB," an open-source message forum manager. Open-source popular applications like phpBB tend to be often targeted by mass scanning and exploiting tools.
</blockquote>
<p>
The hack redirected visitors through several steps ultimately ending up on a page that tried to take advantage of errors in older Internet Explorer and RealPlayer versions. <a href="http://cyberinsecure.com/half-million-sites-mostly-running-phpbb-forum-software-hacked-in-latest-attack/">The article</a> talks about exactly which viruses could have caused the problems and the wide range of sites (both in topic and location) that were effected. 
</p>
<p>
The best way to protect you and your PHPBB install from something like this happening is to get the <a href="http://www.phpbb.com">latest version</a> of the software and learn how to configure it correctly.
</p>]]></description>
      <pubDate>Tue, 13 May 2008 14:04:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[456Bereastreet.com: Build your own PHP style sheet switcher]]></title>
      <guid>http://www.phpdeveloper.org/news/6134</guid>
      <link>http://www.phpdeveloper.org/news/6134</link>
      <description><![CDATA[<p>
At the 456 Berea St blog today, there's <a href="http://www.456bereastreet.com/archive/200608/build_your_own_php_style_sheet_switcher/">a popular new post</a> that demonstrates a simple (yet effective) method for switching out the style sheets on your site at the whim of the user.
</p>
<blockquote>
<p>
Want to have a style switcher that lets your site's visitors choose a different style sheet? Want it to work even if there is no JavaScript support? The trick is to use a server-side language like PHP, which is what I use for my style switcher.
</p>
<p>
Using PHP to let the user switch to a different CSS file is nothing new. But it is one of the things that I am often asked about, so I thought it would be good to have a write-up to refer people to in the future.
</p>
</blockquote>
<p>
The code for <a href="http://www.456bereastreet.com/archive/200608/build_your_own_php_style_sheet_switcher/">the switcher</a> is only about five lines long, implementation and all, but it's a nice, clean way to do it. It would break if the viewer didn't have cookies allowed on their system, though.
</p>]]></description>
      <pubDate>Thu, 24 Aug 2006 15:19:11 -0500</pubDate>
    </item>
  </channel>
</rss>
