ID: 25567 Updated by: [EMAIL PROTECTED] Reported By: alex dot baron at tusk dot com dot au -Status: Open +Status: Bogus Bug Type: IIS related Operating System: Windows XP PHP Version: 4.3.3 New Comment:
RFTM: http://www.php.net/header and about the relative vs. absolute urls on header("Location..") Previous Comments: ------------------------------------------------------------------------ [2003-09-16 23:09:34] alex dot baron at tusk dot com dot au Description: ------------ Hi bug fixing type people, I have a php form posting to a php file that then places the data into mysql. the issue happens when the page is redirected to the homepage the error is CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: if you hit the refresh the page loads. Iam running XP no SP's and have the latest stable relese of PHP on my machine downloaded from snap.php.net and the iis is 5.1 mysql is version 4.0.13-nt also i installed the .net frame work but have uninstalled it since. code that previously work seem to no longer function producing the same error. thanks for your time Alex Reproduce code: --------------- this is the code iam still learning : <? include "../includes/dbconnect.php"; // this is processed when the form is submitted // back on to this page (POST METHOD) if (!is_null($key = key($_POST))) { // double-up apostrophes $description = addslashes($_POST['description']); $subject = addslashes($_POST['subject']); $date = addslashes($_POST['date']); $date = split("-",$date); $date = "$date[2]-$date[1]-$date[0]"; // setup SQL statement $SQL = "INSERT INTO tblnews (description, subject, date) VALUES ('$description','$subject','$date')"; // execute SQL statement $result = mysql_db_query($db,$SQL,$cid); // check for error if (is_null($result)) { echo "ERROR: " . mysql_error() . "\n$SQL\n"; }else{ header("Location: newslisting.php"); exit; } } ?> Expected result: ---------------- submit it to the database and return to the listings page ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=25567&edit=1