php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6546 Header Problem
Submitted: 2000-09-05 00:27 UTC Modified: 2001-03-09 22:01 UTC
From: nymph at innocent dot com Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.0 OS: Linux
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If this is not your bug, you can add a comment by following this link.
If this is your bug, but you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: nymph at innocent dot com
New email:
PHP Version: OS:

 

 [2000-09-05 00:27 UTC] nymph at innocent dot com
When sending a header after including another file (if the other file does not write anything directly), you will get a header problem even though no headers were actually sent. The connect.php only connects to the database. Nothing else.

CODE:

<?
        if (include("include/connect.php")) {} 
	$mysql_connection = mysql_connect($mysql_host,$mysql_user, $mysql_pass);
	$mysql_query = "SELECT * FROM densetsuFiles WHERE Id = '$id'";
	$mysql_result = mysql_db_query($db_name, $mysql_query, $mysql_connection);
	$row = mysql_fetch_array($mysql_result);
	if ($row) {
		header("Location: http://www.domain.com/data/$row[Type]/$row[FileName]");
		end;
	} else {
		$error = "File Not Found";
	}
?>


Warning: Cannot add header information - headers already sent by (output started at include/connect.php:8) in /usr/home/a01/html/densetsu/downloads.php on line 9

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-04-19 10:14 UTC] showrun at yahoo dot com
I have that problem. What is the suggested workaround? 
Maybe someone can post it here? What a novel idea!
 [2022-04-26 07:26 UTC] giw42161 at uooos dot com
Century Law Firm is the best team of lawyers for divorce case, Drt Case, High Court Matter, Civil and Criminal Cases and more in Delhi. 
(https://centurylawfirm.in/)gist.github.com
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Apr 29 13:01:30 2024 UTC