<?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, 23 May 2013 01:59:51 -0500</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Jeremy Cook's Blog: Making PHPUnit, Doctrine & MySQL Play Nicely]]></title>
      <guid>http://www.phpdeveloper.org/news/17620</guid>
      <link>http://www.phpdeveloper.org/news/17620</link>
      <description><![CDATA[<p>
<i>Jeremy Cook</i> has put together a new post showing how he got <a href="http://jeremycook.ca/2012/02/27/making-phpunit-doctrine-mysql-play-nicely/">PUPUnit, Doctrine and MySQL to "play nicely" together</a> when he was writing up some of his tests in a current application.
</p>
<blockquote>
One of the pain points for me though has been in getting Doctrine setup with PHPUnit for testing. One of the main Doctrine contributors, Benjamin Beberlei, has written a package called <a href="https://github.com/beberlei/DoctrineExtensions">DoctrineExtensions</a> which amongst other things adds a class called DoctrineExtensionsPHPUnitOrmTestCase which extends PHPUnit's DbUnit database test case class. This all works well in principle but hits a major snag in reality: MySQL doesn't allow InnoDb tables with foreign keys to be truncated. PHUnit's database extension truncates the database tables before each test run and inserts a fresh set of data to work with.
</blockquote>
<p>
To work around this issue <i>Jeremy</i> by porting over <a href="https://gist.github.com/1319731">a method</a> posted by <i>Mike Lively</i> over to Doctrine as a custom "MySQLTruncate" class (code included in the post). He also includes some sample code showing it in use - a basic ORM test case that calls the truncate method when its set up. 
</p>]]></description>
      <pubDate>Fri, 02 Mar 2012 12:05:48 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Secunia.com: PHP "gdPngReadData()" Truncated PNG Data Denial of Service]]></title>
      <guid>http://www.phpdeveloper.org/news/7894</guid>
      <link>http://www.phpdeveloper.org/news/7894</link>
      <description><![CDATA[<p>
Secunia has posted <a href="http://secunia.com/advisories/25378/">this new advisory</a> today about an issue with the GD graphics library functionality in PHP that could be used to cause a Denial of Service via a truncated PNG image.
</p>
<blockquote>
The vulnerability is caused due to the incorrect use of libpng within the function "gdPngReadData()" in ext/gd/libgd/gd_png.c of the GD extension when processing truncated data. This can be exploited to cause an infinite loop by e.g. tricking an application to process a specially crafted file. (reported by Xavier Roche)
</blockquote>
<p>
<a href="http://secunia.com/advisories/25378/">This issue</a> has been confirmed in PHP versions 4.4.7 and 5.2.2 but may affect others. The issue has already been corrected, however, and can be fetched from the <a href="http://viewcvs.php.net/viewvc.cgi/gd/libgd/gd_png.c?r1=1.22&r2=1.23&pathrev=HEAD">PHP CVS system</a> to protect your system.
</p>]]></description>
      <pubDate>Tue, 22 May 2007 11:09:00 -0500</pubDate>
    </item>
  </channel>
</rss>
