PHP refuses to let you report a bug in any version of PHP older than the absolute latest & greatest.

At work today, we discovered a bug with PDO, the PHP version of Perl’s DBI. Turns out if you pass in too many bind parameters, PDO segfaults. Here’s the simple program that Pete Krawczyk put together to exercise it.

<?php
$dbh = new PDO( 'pgsql:host=localhost;dbname=FOO', 'PASSWORD', '', Array(
PDO::ATTR_PERSISTENT   => true,
PDO::ERRMODE_EXCEPTION => true,
) );
$array = Array();
for ($i = 1; $i < 10; $i++) {
$array[] = $i;
$sth = $dbh->prepare('SELECT 1 FROM USERS WHERE CUSTID = ? LIMIT 1');
$sth->execute($array);
while ( $sth->fetch( PDO::FETCH_NUM ) ) {
# do nothing
}
unset($sth);
print "PDO lived OK with $i bind" . ($i == 1 ? '' : 's') . "n";
}
?>

It’s repeatable for us on PHP 5.2.5. So after searching to see that nobody else had already reported it on bugs.php.net, I went to report it.

Alas, when I went to report the bug, I was not able to. My bug happened in 5.2.5, but according to the dialog, that wasn’t an option. No, I was left with “Earlier? Upgrade first!”

Latest and greatest only, please!

No, PHP, I am not going to upgrade my PHP installation in order to be blessed with the opportunity of telling you about a segfault in a version of software one minor revision older.

No, PHP, I am not going to spend an hour building and installing another monolithic PHP on some test server so that I might gain the privilege, the privilege I say!, of helping out your project.

What a backwards way to look at open source development! “You must be at least this tall in order to report bugs.” What a way to help scare away contributors.

Perhaps you should have a look at how Perl handles it, where we have a wide open ticketing system. There’s a tool called perlbug that ships with Perl to encourage responses. The perl5-porters might get some inappropriate bug reports, maybe in a module rather than core Perl, but those are easily closed. We don’t put up barriers to reporting. We know how to treat the outside world, because we welcome the feedback.

Get a clue, PHP people.