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
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please !
Your email address:
MUST BE VALID
Solve the problem:
41 - 30 = ?
Subscribe to this entry?

 
 [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: Sun Oct 20 08:01:26 2019 UTC