php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #507 Header() doesn't work after 'echo mysql_error()', even if there is no error
Submitted: 1998-07-03 13:26 UTC Modified: 1998-07-04 08:00 UTC
From: joe at jlknet dot com Assigned:
Status: Closed Package: MySQL related
PHP Version: 3.0 Final Release OS: FreeBSD 2.1.7.1-RELEASE
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: joe at jlknet dot com
New email:
PHP Version: OS:

 

 [1998-07-03 13:26 UTC] joe at jlknet dot com
PHP running as a CGI...  Seems to work on both mysql and msql (I have nothing else to test it on):

<?php
msql("jkoe-vqf", "SELECT * FROM updates");
echo msql_error();
Header("Location: http://www.vqf.com/");
?>

Returns 'document contains no data', although:

<?php
msql("jkoe-vqf", "SELECT * FROM updates");
// echo msql_error();
Header("Location: http://www.vqf.com/");
?>

..redirects as expected.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1998-07-04 08:00 UTC] ssb
Always call Header() and SetCookie() _before_ doing
echo, print or anything else that is supposed to
print content.

 
PHP Copyright © 2001-2019 The PHP Group
All rights reserved.
Last updated: Wed Jul 24 02:01:27 2019 UTC