php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #13383 The specified CGI application misbehaved by not returning a complete set of HTT
Submitted: 2001-09-21 20:27 UTC Modified: 2002-05-25 09:27 UTC
Votes:2
Avg. Score:3.0 ± 2.0
Reproduced:2 of 2 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (50.0%)
From: smanish at mailandnews dot com Assigned:
Status: Not a bug Package: IIS related
PHP Version: 4.0.6 OS: Windows 2000 with IIS 5.0
Private report: No CVE-ID: None
 [2001-09-21 20:27 UTC] smanish at mailandnews dot com
<?php
//header ("Content-type: image/gif") ;
?>
<html>
<body>
<?php
	$dbh = ibase_connect("localhost:c:\program files\borland\interbase\bin\Binary_Data.gdb", "SYSDBA", "masterkey");
	
	$sth = ibase_query($dbh, "select description, bin_data from binary_data where id = 5") ;

	$row = ibase_fetch_row($sth) ;
	print ("Description : $row[0]") ;
	$blobid = ibase_blob_open($row[1]) ;
	$tempibase = tempnam("temp", "TMP") ;
	$tempibase .= ".gif" ;
	//$fp = fopen($tempibase, "w") ;
	while($data = ibase_blob_get($blobid, 1024))
	{
	//	fputs($fp, $data) ;
	
		$finaldata .= $data ;
	}

	//fclose($fp) ;
	ibase_blob_close($blobid) ;
	ibase_free_query($sth) ;
	
	//print ("Got the blob field") ;

	//print ($finaldata) ;

	//echo "<br><center><img src=$tempibase ></center>" ;

	/*$blobid = ibase_blob_create() ;
	ibase_blob_add($blobid, $data) ;
	$blob_id_save = ibase_blob_close($blobid) ;*/
	
    ibase_close($dbh) ;
?>
</body>
<html>

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-11 17:47 UTC] enrique dot javier at cox dot net
I got the same error just with a fresh installation of PHP 4.1.1 on Windows 2000 Professional, and IIS 5.0; I can actually reproduce the error; also, I don't think is InterBase related, or for that matter, any application specific related issue.

Problem
-------
Just trying to run a simple test; such as

<html><head><title>PHP Test</title></head>
<body>
<?php echo "Hello World<p>"; ?>
</body></html>

will cause the error message

"CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:"

to be displayed; the actual source code of this page is

<head><title>Error in CGI Application</title></head>
<body><h1>CGI Error</h1>The specified CGI application misbehaved by not returning a complete set of HTTP headers.  The headers it did return are:<p><p><pre></pre>

Note the double <p> tags. The parsed output for the above example from php is

<html><head><title>PHP Test</title></head>
<body>
Hello World<p></body></html>

Solution
--------
The problem goes away by checking the 'Check that files exist' option in the Application Extension Mapping for PHP file extensions, such as '.php'.
 [2002-05-25 09:27 UTC] derick@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately your version of PHP is too old -- the problem
might already be fixed. Please download a new PHP
version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 [2003-09-15 03:34 UTC] haffo at hotmail dot com
Running IIS 5.1 PHP 4.3.3

Getting error:
CGI Error
The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are:

I get it about every 5-6 times i use call login.php?logout=

from login.php:
if (isset($_GET['logout'])){
	session_start();
	session_unset();
	session_destroy();
   	header("Location: main.php?page=index");
   exit;
}
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Apr 19 02:01:29 2024 UTC