<?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>Tue, 18 Jun 2013 01:35:40 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Anthony Ferrara: Programming With Anthony - Prepared Statements]]></title>
      <guid>http://www.phpdeveloper.org/news/18887</guid>
      <link>http://www.phpdeveloper.org/news/18887</link>
      <description><![CDATA[<p>
<i>Anthony Ferrara</i> has posted about the latest installation in his video tutorial series he's been producing on various programming topics. In <a href="http://blog.ircmaxell.com/2012/12/programming-with-anthony-prepared.html">this latest video</a> he covers the use of prepared statements in your database interactions.
</p>
<blockquote>
The fourth video in the <a href="http://blog.ircmaxell.com/search/label/Programming%20With%20Anthony">Programming With Anthony series</a> is live! In this video, we'll explore the basic principles of prepared statements, and why you should use them instead of using escaped input directly in queries.
</blockquote>
<p>
You can watch this latest video <a href="http://www.youtube.com/watch?v=nLinqtCfhKY">over on YouTube</a>. You can also check out the previous videos in the series while you're there covering <a href="https://www.youtube.com/watch?v=CV4vPsEizJM">paradigms</a>, <a href="https://www.youtube.com/watch?v=RLmuFlDygn0">encryption</a> and <a href="https://www.youtube.com/watch?v=_YZIBWQr_yk">references</a>.
</p>]]></description>
      <pubDate>Thu, 13 Dec 2012 11:50:22 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Greebo.net: Converting your PHP app to MySQLi prepared statements]]></title>
      <guid>http://www.phpdeveloper.org/news/13773</guid>
      <link>http://www.phpdeveloper.org/news/13773</link>
      <description><![CDATA[<p>
From Greebo.net there's <a href="http://www.greebo.net/2010/01/02/converting-your-php-app-to-mysqli-prepared-statements/">a recent post</a> that looks at converting the current database functionality in your application over to the MySQLi functionality and making use of prepared statements as a later of protection for your queries.
</p>
<blockquote>
Okay, you've got like a zillion SQL queries in your PHP app, and probably 95% of them have a WHERE clause, and you need to make them safe so people will still download and use your app. Because if you don't fix your injection issues, I will rain fire on your ass. These are the steps you need to take to convert to prepared statements.
</blockquote>
<p>
The guide is two steps you'll need to make the transition - "PHP 4 is dead. Upgrade to PHP 5" and "make sure your hoster has MySQLi". The major part of the update is under the first point where he gives code examples and suggestions to follow about how to "harden" your environment to prevent and issues that lax SQL methods might have caused and a simple example of a move from MySQL to MySQLi.
</p>]]></description>
      <pubDate>Mon, 04 Jan 2010 13:46:13 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Wez Furlong's Blog: Using PDO MySQL?]]></title>
      <guid>http://www.phpdeveloper.org/news/5221</guid>
      <link>http://www.phpdeveloper.org/news/5221</link>
      <description><![CDATA[<p>
In <a href="http://netevil.org/node.php?nid=795">this new post</a> from <i>Wez Furlong</i>, he looks ar some of the things that the native MySQL client library does (the silly things) and recommends an alternative with the PDO libraries.
</p>
<quote>
<i>
I've recently discovered a few things about how the mysql client library does things that seem a bit silly to me, so I'm going to share them with you.
</i>
</quote>
<p>
Among the things he mentions functionality (dealing with prepared statements) like "native prepared statements cannot take advantage of the query cache" and "native prepared statements cannot execute certain types of queries". The gives a simple line of code to make the database functionality (in PHP 5.1.3 and later) use the native PDO query parser to be loaded versus the one for the standard MySQL client libraries.
</p>]]></description>
      <pubDate>Mon, 24 Apr 2006 07:03:01 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Ilia Alshanetsky's Blog: mysql_real_escape_string() versus Prepared Statements]]></title>
      <guid>http://www.phpdeveloper.org/news/4705</guid>
      <link>http://www.phpdeveloper.org/news/4705</link>
      <description><![CDATA[<i>Ilia Alshanetsky</i> also has <a href="http://ilia.ws/archives/103-mysql_real_escape_string-versus-Prepared-Statements.html">hos own look</a> today at the "mysql_real_escape_string versus addslashes" debate that's <a href="http://www.phpdeveloper.org/news/4703">going on</a>, looking more at why there's even an issue here (with addslashes).
<p>
<quote>
<i>
<a href="http://shiflett.org/archive/184">Chris</a> has written a compelling piece about how the use of addslashes() for string escaping in MySQL queries can lead to SQL injection through the abuse of multibyte character sets. In his example he relies on addslashes() to convert an invalid multibyte sequence into a valid one, which also has an embedded ' that is not escaped. And in an ironic twist, the function intended to protect against SQL injection is used to actually trigger it.
<p>
The problem demonstrated, actually goes a bit further, which even makes the prescribed escaping mechanism, mysql_real_escape_string() prone to the same kind of issues affecting addslashes().
</i>
</quote>
<p>
He <a href="http://ilia.ws/archives/103-mysql_real_escape_string-versus-Prepared-Statements.html">shows code examples</a>, creating a simple SQL injection that uses mysql_real_escape_string to cause the same issue - all based around the default characterset that the MySQL server uses. His suggested solution? Prepared statements... (like what things such as <a href="http://www.php.net/PDO">PDO</a> offer)]]></description>
      <pubDate>Mon, 23 Jan 2006 06:58:18 -0600</pubDate>
    </item>
  </channel>
</rss>
