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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
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

Pull Requests

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-2025 The PHP Group
All rights reserved.
Last updated: Sat May 10 01:01:28 2025 UTC