php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #25567 The specified CGI application misbehaved by not returning a complete set of HTT
Submitted: 2003-09-16 23:09 UTC Modified: 2003-09-24 22:24 UTC
From: alex dot baron at tusk dot com dot au Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.3.3 OS: Windows XP
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: alex dot baron at tusk dot com dot au
New email:
PHP Version: OS:

 

 [2003-09-16 23:09 UTC] 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


Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-09-17 01:22 UTC] sniper@php.net
RFTM: http://www.php.net/header and about the relative vs. absolute urls on header("Location..")
 [2003-09-24 22:24 UTC] alex dot baron at tusk dot com dot au
Well thanks For you help... not

Anyway the issue lies with using microsft proxy client on the machine hosting the pages. This causes a CGI Header error. Removing the proxy client fixes the issue but prvents the developer from being able to access the outside via proxy.

I hope this helps other people.

A
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Apr 18 09:01:27 2024 UTC