php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #49655 no page generation unless MySQL will be closed with link identifier $link
Submitted: 2009-09-24 11:16 UTC Modified: 2009-09-24 11:20 UTC
From: mail at rene-schwarz dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 5.3.0 OS: Windows Server 2003 R2 x64 Datac
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: mail at rene-schwarz dot com
New email:
PHP Version: OS:

 

 [2009-09-24 11:16 UTC] mail at rene-schwarz dot com
Description:
------------
PHP 5.3.0 generates no output page in case a MySQL connection is closed without any identifier.

My solution for this problem was to change all PHP scripts to the following:

$link = @mysql_connect(...);
// some code here
mysql_close($link);

I noticed this error when I'm getting a blank page as output and when I successively inserted a die() command each line until I got a blank page (mysql_close() was the reason).

All software / scripts using MySQL has been affected (f.e. RoundCube).

Reproduce code:
---------------
@mysql_connect(...);
// some code here
mysql_close();

Expected result:
----------------
Page generation.

Actual result:
--------------
No page generation -- blank page.

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-09-24 11:17 UTC] mail at rene-schwarz dot com
Seems similar to solved bug #7879 some years ago.
 [2009-09-24 11:20 UTC] pajoye@php.net
Duplicate of #48754, which is now fixed in SVN.
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Tue Jul 01 07:01:33 2025 UTC