From: nospam at kolbly dot com Operating system: Win2003 Server PHP version: 4.3.2 PHP Bug Type: IIS related Bug description: SQL Server Query + Redirect = 502 Error
Description: ------------ When redirecting to a .php page that connects to an SQL Server database via ODBC, IIS produces a 502 error intermittently on slower machines and 100% on faster machines. This is admittedly a duplicate of Bug #9852 (Which is currently closed), but my tests have pointed that the problem is with PHP, not IIS. I have opened up an Incident with Microsoft and we are at the point where if I can reproduce the bug using some non-php code, they will duplicate my setup exactly in their lab and have their developers tackle it. But, so far I cannot reproduce the error with any non-php code. I traced the php function calls, and wrote a C program that calls the exact same odbc calls as php, but this does NOT break IIS. I can only conclude that the issue is within PHP or Zend or at the very least it is still very much in doubt as to which code is at fault here. I have tried ALL the suggested workarounds from Bug #9852 with no luck. I will be forced to rewrite 8 websites in .asp or .net if I can’t fix this. If anybody has a way to reproduce this error using C/C++/C#/ASP or some other “Microsoft-Approved” language, please send me your source code. ([EMAIL PROTECTED]) Reproduce code: --------------- <?php $dbconn = odbc_connect("bug", "buguser", "bugpass"); $rs = odbc_exec($dbconn, "select * from employees"); while(odbc_fetch_row($rs)) { $EmployeeID = odbc_result($rs, "EmployeeID"); } if (isset($_POST['Submit'])) { header("Location: test1a.php"); die; } ?> <html> <head> <title>Bug Test</title> <meta http-equiv="Content-Type" content="text/plain; charset=iso-8859-1"> </head> <body> <form name="form1" method="post" action="test1a.php"> <p>Click Submit to post back to this page.</p> <input type="submit" name="Submit" value="Submit"> </form> </body> </html> Expected result: ---------------- Click Submit to post back to this page. [Submit] Actual result: -------------- CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. -- Edit bug report at http://bugs.php.net/?id=24463&edit=1 -- Try a CVS snapshot: http://bugs.php.net/fix.php?id=24463&r=trysnapshot Fixed in CVS: http://bugs.php.net/fix.php?id=24463&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=24463&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=24463&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=24463&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=24463&r=support Expected behavior: http://bugs.php.net/fix.php?id=24463&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=24463&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=24463&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=24463&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=24463&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=24463&r=dst IIS Stability: http://bugs.php.net/fix.php?id=24463&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=24463&r=gnused