<?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, 21 Nov 2008 05:16:38 -0600</pubDate>
    <ttl>30</ttl>
    <item>
      <title><![CDATA[Brian Moon's Blog: in_array is quite slow]]></title>
      <guid>http://www.phpdeveloper.org/news/10357</guid>
      <link>http://www.phpdeveloper.org/news/10357</link>
      <description><![CDATA[<p>
<i>Brian Moon</i> had <a href="http://brian.moonspot.net/2008/06/05/in_array-is-quite-slow/">a problem</a> - one of his cron jobs was lasting for much longer (hours!) than it should have been. He tweaked, tested and debugged the script and finally came down to a call to <a href="http://www.php.net/in_array">in_array</a>, something he comments on as being "quite slow".
</p>
<blockquote>
See, this job is importing data from a huge XML file into MySQL.  After it is done, we want to compare the data we just added/updated to the data in the table so we can deactivate any data we did not update. [...] We then compared the two arrays by looping one array and using in_array() to check if the value was in the second array. [...] So, that was running for hours with about 400k items.  Our data did not contain the value as the key, but it could as the value was unique.  
</blockquote>
<p>
He method, replacing the in_array call that had to do a full array scan for each time through the loop with an isset/unset combo on the unique key, changed the execution time down from about 4 hours to 0.8 seconds.
</p>]]></description>
      <pubDate>Fri, 06 Jun 2008 09:36:47 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Nessa's Blog: Common PHP Errors]]></title>
      <guid>http://www.phpdeveloper.org/news/9208</guid>
      <link>http://www.phpdeveloper.org/news/9208</link>
      <description><![CDATA[<p>
<i>Nessa</i> has <a href="http://www.v-nessa.net/2007/12/07/common-php-errors">set up a post</a> in an effort to help budding PHP developers out there with some of the most common problems they might come across in their work and how to handle them a bit more gracefully with error handling:
</p>
<blockquote>
I'm going back to the basics here, you know, when you wrote your first PHP script and saw an ugly-ass error message pop up on your screen? Error messages are the best tool a programmer has.
</blockquote>
<p>
She talks about how to set up the error reporting first, making sure that you're getting things up and useful. From there she describes some of the common errors that you might see including:
</p>
<ul>
<li>Parse errors
<li>MySQL Result source errors
<li>Stream errors
<li>Max Execution Time errors
</ul>
<p>
Check out <a href="http://www.v-nessa.net/2007/12/07/common-php-errors">the rest of the post</a> for more types.
</p>]]></description>
      <pubDate>Mon, 10 Dec 2007 12:05:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[PHP Discovery Blog: Dangers of Remote Execution]]></title>
      <guid>http://www.phpdeveloper.org/news/9092</guid>
      <link>http://www.phpdeveloper.org/news/9092</link>
      <description><![CDATA[<p>
On the PHP Discovery blog, there's a <a href="http://phpdiscovery.com/dangers-of-remote-execution/">new post</a> reminding PHP developers of some of the more dangerous ways that remote execution could effect your site and some of the common entry points it can have.
</p>
<blockquote>
PHP has numerous ways to execute raw PHP code unless you the programmer stops it.  Best way in preventing these methods is making sure you check the input of what your users are inputting, and making sure you escape all malicious actions that a hacker,cracker, kiddy scripter might want to do to your website. 
</blockquote>
<p>
He summarizes four of the things from the <a href="http://apress.com/book/view/1590595084">Pro PHP Security</a> book from Apress (by <i>Chris Snyder</i> and <i>Michael Southwell</i>) that can leave holes in you application for would-be explots - preg_replace, shell_exec/exec, eval (which we all know is only one letter from "evil" anyway) and require/include.
</p>]]></description>
      <pubDate>Wed, 21 Nov 2007 13:48:00 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Secunia.com: PHP "glob()" Code Execution Vulnerability]]></title>
      <guid>http://www.phpdeveloper.org/news/8255</guid>
      <link>http://www.phpdeveloper.org/news/8255</link>
      <description><![CDATA[<p>
As reported <a href="http://secunia.com/advisories/26085/">here on Secunia</a> (as <a href="http://milw0rm.com/exploits/4181">discovered by shinnai</a>), there's a code execution vulnerability in PHP's glob function:
</p>
<blockquote>
<p>
The vulnerability is caused due to an error in the handling of an uninitialized structure inside the "glob()" function. This can be exploited to execute arbitrary code, which may lead to security restrictions (e.g. the "disable_functions" directive) being bypassed.
</p>
<p>
The vulnerability is confirmed in the 5.2.3 win32 installer. Other versions may also be affected.
</p>
</blockquote>
<p>
The issue is marked as "less critical" and can be avoided easily by only allowing trusted users the correct permissions to execute PHP code on the server.
</p>]]></description>
      <pubDate>Mon, 16 Jul 2007 13:52:38 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Secunia.com: TCExam PHP Code Execution and Cross-Site Scripting]]></title>
      <guid>http://www.phpdeveloper.org/news/7749</guid>
      <link>http://www.phpdeveloper.org/news/7749</link>
      <description><![CDATA[<p>
TCExam users will definitely want to pay attention to <a href="http://secunia.com/advisories/25008/">this latest advisory</a> posted by Secunia detailing a PHP code execution and cross-site scripting issue that's been found:
</p>
<blockquote>
rgod has discovered two vulnerabilities in TCExam, which can be exploited by malicious people to conduct cross-site scripting attacks or to compromise a vulnerable system.
</blockquote>
<p>
The two issues is related to two different inpus not being handled properly - the mishandling of the SessionUserLang cookie and the _SERVER[SCRIPT_NAME] value. Neither of these are being sanitized.
</p>
<p>
<a href="http://secunia.com/advisories/25008/">This issue</a> effects users of the TCExam 4.x series but a new version, 4.1.000, has already been released and made available for download.
</p>]]></description>
      <pubDate>Tue, 01 May 2007 14:18:00 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Christian Stocker's Blog: Upload Progress Meter finally in PECL]]></title>
      <guid>http://www.phpdeveloper.org/news/6821</guid>
      <link>http://www.phpdeveloper.org/news/6821</link>
      <description><![CDATA[<p>
According to <a href="http://blog.bitflux.ch/archive/2006/12/05/upload-progress-meter-finally-in-pecl.html">this note</a> from <i>Christian Stocker</i> on the BitFlux blog, the upload progress meter (using the new file upload hooks introduced in recent PHP versions) has finally been included, officially, into PECL.
</p>
<blockquote>
After some tweaking, code improvements and <a href="http://blog.php-security.org/archives/58-Suhosin-caught-another-remote-code-execution-vulnerability.html">remote code execution vulnerability fixes</a>, I finally put the <a href="http://pecl.php.net/package/uploadprogress">uploadprogress extension</a> into PECL.
</blockquote>
<p>
Windows users might be out of luck for a while though, since <i>Christian</i>'s not pursuing binaries for the package. However, <a href="http://pecl.php.net/package/uploadprogress">the source</a> is there, and anyone is more than welcome to try...
</p>]]></description>
      <pubDate>Tue, 05 Dec 2006 07:09:44 -0600</pubDate>
    </item>
    <item>
      <title><![CDATA[Hardened-PHP.net:  Zend Platform Multiple Remote Vulnerabilities]]></title>
      <guid>http://www.phpdeveloper.org/news/6127</guid>
      <link>http://www.phpdeveloper.org/news/6127</link>
      <description><![CDATA[<p>
According to <a href="http://www.hardened-php.net/advisory_052006.128.html">this new advisory</a> on the Hardened-PHP project's site, there are some issues with the Zend Platform product that could cause a number of security issues becaue of malformed session IDs.
</p>
<blockquote>
During the development of suhosin, which is our new PHP protection module, several compatibility tests with binary 3rd party PHP extensions like the Zend Platform and the Zend Optimizer have been made. When testing the session protection features of suhosin, we discovered that the session clustering system, which is shipping with the Zend Platform is vulnerable to several different attacks.
</blockquote>
<p>
They mentions <a href="http://www.hardened-php.net/advisory_052006.128.html">a few things</a> a potential attacker could use this issue for, including crashing the session daemon, remote code execution, and being able to view and write files of their choice (like session files) to execute malicious code.
</p>
<p>
The details are listed out, but a "proof of concept" isn't published for this exploit. Thankfully, Zend has already provided a patch for the issue which can be downloaded at <a href="http://www.zend.com/download">Zend's website</a> (an upgrade to version 2.2.1a).
</p>]]></description>
      <pubDate>Thu, 24 Aug 2006 07:58:24 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[International PHP Magazine: IPM Poll Question: Which One is Most Dangerous?]]></title>
      <guid>http://www.phpdeveloper.org/news/6069</guid>
      <link>http://www.phpdeveloper.org/news/6069</link>
      <description><![CDATA[<p>
The International PHP Magazine has posted <a href="http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26228,nodeid,5.html">the results from their latest poll</a>, this time asking which one of their options is the most dangerous kind of problem an application can have.
</p>
<p>
Options included "remote code execution", "SQL injections", and "file system attacks". Topping the charts, and almost typing for first place are "remote code execution" and "SQL injection", with SQL edging out the remote code.
</p>
<blockquote>
The majority believes that 'SQL Injection' is the most common PHP attack as it garnered 33.6% of the votes. The PHP attack 'Remote Code Execution' scored 30.9% of the votes. The options 'File system attacks' and 'Cross-site Scripting' bagged 10.9% and 8.2% respectively. Not many people seem to consider the existence of any other PHP attack as the option 'Others' polled a dismal 0.9%.
</blockquote>
<p>
Their <a href="http://www.php-mag.net/magphpde/magphpde_news/psecom,id,26230,nodeid,5.html">latest poll</a> goes with a different subject, asking readers to vote on which of their options is the best way to speed up a site. Check it out and cast your vote today!
</p>]]></description>
      <pubDate>Thu, 17 Aug 2006 14:12:41 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[Net-Security.org: SUSE Security Announcement - php4,php5 problems]]></title>
      <guid>http://www.phpdeveloper.org/news/5605</guid>
      <link>http://www.phpdeveloper.org/news/5605</link>
      <description><![CDATA[<p>
In a new <a href="http://www.net-security.org/advisory.php?id=6388">SUSE security announcement</a> today, issues have been found with PHP4 and PHP5 bundled with serveral versions of their Linux operating system.
</p>
<p>
The four issues found are as follows:
<ul>
<li>Invalid characters in session names were not blocked.
<li>CVE-2006-2657: A bug in zend_hash_del() allowed attackers to prevent unsetting of some variables.
<li>CVE-2006-1991, CVE-2006-1990: Bugs in the substr_compare()  and wordwrap function could crash the php interpreter.
<li>CVE-2006-2906: A CPU consumption denial of service attack in php-gd was fixed.
</ul>
</p>
<p>
<a href="http://www.net-security.org/advisory.php?id=6388">These issues</a> affect the foloowing versions of SUSE: 10.1, 10.0, 9.3, 9.2, 9.1, Enterprise Server 8, SLES 9, and UnitedLinux 1.0. They can all be used to execute any arbitrary code the user chooses to inject. The severity level is higher on this one, but not at a critical level. It's still recommended, however, that you upgrade as soon as possible. Links to the various upgrade packages <a href="http://www.net-security.org/advisory.php?id=6388">can be found here</a>
</p>]]></description>
      <pubDate>Fri, 16 Jun 2006 06:14:29 -0500</pubDate>
    </item>
    <item>
      <title><![CDATA[PHPMac.com: IP Banning]]></title>
      <guid>http://www.phpdeveloper.org/news/4937</guid>
      <link>http://www.phpdeveloper.org/news/4937</link>
      <description><![CDATA[PHPMac.com has posted <a href="http://phpmac.com/articles.php?view=248">a quick tutorial</a> on how to "ban an IP" from your site.
<p>
<quote>
<i>
Blocking certain IP addresses from your site is actually much easier than you might think.
<p>
In fact, it is only a seven-line code inserted at the top of your page!
</i>
</quote>
<p>
<a href="http://phpmac.com/articles.php?view=248">The code</a> basically just looks in an array of IP values and checks to see if the remote user's matches any of them. If it does, it echos out an error and stops the page execution. Obviously, this is just a basic example, and could be enhanced with a databse table that would be easier to manage than just the static array.]]></description>
      <pubDate>Mon, 06 Mar 2006 07:18:29 -0600</pubDate>
    </item>
  </channel>
</rss>
