<?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>Fri, 24 May 2013 04:20:42 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Evert Pot's Blog: basename() is locale-aware]]></title>
      <guid>http://www.phpdeveloper.org/news/14269</guid>
      <link>http://www.phpdeveloper.org/news/14269</link>
      <description><![CDATA[<p>
<i>Evert Pot</i> found out an interesting thing about the <a href="http://php.net/basename">basename</a> function in PHP - it's more than just a handy shortcut for paths, it's <a href="http://www.rooftopsolutions.nl/article/271">also locale aware</a>.
</p>
<blockquote>
It turns out basename does a bit more than just splicing the string at the last slash, because it's locale aware. In my case I was dealing with a multi-byte UTF-8 string. It took me quite some time figuring out what was going on, because I was testing from the console which had the en_US.UTF-8 locale, and the bug was appearing on Apache, which defaults to the C locale.
</blockquote>
<p>
He includes an example snippet of code showing how it can work with both the default (well, for Apache anyway) of the "C" locale versus the "UTF-8" locale and return different results for the same <a href="http://php.net/urldecode">urldecoded</a> information.
</p>]]></description>
      <pubDate>Tue, 30 Mar 2010 12:04:35 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Dave Dash's Blog: Fixing Broken PATH_INFO]]></title>
      <guid>http://www.phpdeveloper.org/news/9486</guid>
      <link>http://www.phpdeveloper.org/news/9486</link>
      <description><![CDATA[<p>
<i>Dave Dash</i> has <a href="http://spindrop.us/2008/01/23/fixing-broken-path_info/">posted about a method</a> he developed, using a custom prepend file, to correctly obtain the PATH_INFO information for his server.
</p>
<blockquote>
<a href="http://symfony-project.com/">symfony</a> and other applications rely on the server's PATH_INFO being set properly. Unfortunately, I use a nonstandard server that doesn't natively support CGI [...] but I can't figure out how to do a urldecode in my configuration.
</blockquote>
<p>
To get around the issue, he <a href="http://spindrop.us/2008/01/23/fixing-broken-path_info/">created</a> a file he prepended to each request (via auto_prepend_file) that took the value and urldecoded it to put it in another $_SERVER value.
</p>]]></description>
      <pubDate>Thu, 24 Jan 2008 10:21:00 -0600</pubDate>
    </item>
  </channel>
</rss>
