From:             alex dot baron at tusk dot com dot au
Operating system: Windows XP
PHP version:      4.3.3
PHP Bug Type:     IIS related
Bug description:  The specified CGI application misbehaved by not returning a complete 
set of HTT

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 bug report at http://bugs.php.net/?id=25567&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=25567&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=25567&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=25567&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=25567&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=25567&r=needtrace
Try newer version:          http://bugs.php.net/fix.php?id=25567&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=25567&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=25567&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=25567&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=25567&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=25567&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=25567&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=25567&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=25567&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=25567&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=25567&r=float

Reply via email to