php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #41564 Lost connection to MySQL server during query
Submitted: 2007-06-01 16:23 UTC Modified: 2007-06-04 08:37 UTC
From: mm7102_us at yahoo dot com Assigned:
Status: Not a bug Package: MySQL related
PHP Version: 4.4.7 OS: Linux daffy.perf.redhat.com
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: mm7102_us at yahoo dot com
New email:
PHP Version: OS:

 

 [2007-06-01 16:23 UTC] mm7102_us at yahoo dot com
Description:
------------
We have internal apllication (PHP Version 4.1.2) which is using Mysql as databse.
The application is having 10 pages(Admin,login,Sales,etc.,) and all these pages connects to database mysql.
When I hit Admin page everytime they sometimes execute ok and sometimes they don't
 I am getting below error message
"Lost connection to MySQL server during query"

My using following environment
System: Linux daffy.perf.redhat.com 2.4.18-11smp #1 SMP Thu Aug 15 06:41:59 EDT 2002 i686 unknown
Web Server :Apache/1.3.23

Notes :"Query is working fine from sql prompt"
        CPU utilization is normal
        No load on Mysql
        Mysql is installed on the same machine

Please help me in resoving this

Reproduce code:
---------------
#Get user list from db
$SQL = "select	u.user_name,u.fname,u.lname,u.user_id,visits,
		date_format( u.lu_date, '%m/%d/%Y') lu_date,
	from	users u
	left outer join users_bb ub on	ub.user_id = u.user_id
	left outer join users_per_type upt
	on	upt.user_id = u.user_id AND
		upt.tab = 'default'
	order by 1";
$RESULT = mysql_query($SQL) or die(mysql_error());

$COUNT   = mysql_num_rows($RESULT); // error -most of the times 

Expected result:
----------------
Query should execute always

Actual result:
--------------
some times I will get Lost connection to MySQL server during query

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-06-04 08:37 UTC] tony2001@php.net
Thank you for taking the time to report a problem with PHP.
Unfortunately you are not using a current version of PHP -- 
the problem might already be fixed. Please download a new
PHP version from http://www.php.net/downloads.php

If you are able to reproduce the bug with one of the latest
versions of PHP, please change the PHP version on this bug report
to the version you tested and change the status back to "Open".
Again, thank you for your continued support of PHP.


 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Jun 13 11:01:35 2024 UTC