|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-06-04 08:37 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Dec 07 17:00:02 2025 UTC |
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