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 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: 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-2024 The PHP Group
All rights reserved.
Last updated: Fri Mar 29 12:01:27 2024 UTC