php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #3278 mysql_connect echos error message to html Page on Failure
Submitted: 2000-01-22 05:20 UTC Modified: 2000-01-22 12:39 UTC
From: estartu at augusta dot de Assigned:
Status: Closed Package: Documentation problem
PHP Version: 3.0.12 OS: FreeBSD 3.4-STABLE
Private report: No CVE-ID: None
 [2000-01-22 05:20 UTC] estartu at augusta dot de
mysql_connect echos a failure message direktly to the html
page instead of store it for geting it via mysql_error()

I use mysql_connect together with http authentification. 
I Use the Username an Passwd supplied by apache to connect
to mysql. As this far everything work fine. But if the 
login fails mysql_connect echos the error Page to the 
created Page making it imposible to use
Header("HTTP/1.0 401 Unauthorized"); to signal unauthorized
access back to the user. 

If the user just misstyped his passwd, there is no way to 
correct this because Netscape don?t redisplay the 
Username/Passwd requester. Not until Netscape is quit and
restarted.  

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-01-22 05:47 UTC] torben at cvs dot php dot net
I'm changing this to a Documentation bug, since it indicates a
problem in the documentation. The behaviour described here is not a
bug (i.e., that's the way it's supposed to be), but maybe the docs don't
make that clear enough.
 [2000-01-22 12:39 UTC] mrobinso at cvs dot php dot net
Changed the documentation to show the function returns an error message on failure, together with a note on how to suppress the error message by prepending '@' to the function.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat May 18 00:01:33 2024 UTC