Jump to content


Photo

How to debug intermittent problem?


  • Please log in to reply
3 replies to this topic

#1 JRS

JRS
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 24 May 2006 - 03:27 PM

Hello,

I am looking for suggestions on how to try and debug this problem or determine if the problem is with the ISP's system.

I have a PHP/Mysql application:
ISP - it's on Linux, Mysql & PHP
Local - Win XP, Mysql & PHP

My application access a database of customers and list them. On the ISP site - sometimes it comes up blank. Other times it lists all the customers.

I assumed, there was something wrong in my code and copied the database locally to test on my development system. I was thinking the database was exposing a problem in my code. However, on the local site - I cannot get the application to fail. However, on the ISP site - it fails intermittently.

So I'm thinking perhaps I'm having problems with Mysql database connection - however, I'm not getting any error messages! I'm on a shared site - so I don't have administrator priveleges. I checked the log files that are available to me and they are all empty.

One other thing - I'm going to check are slow queries - but I've set limits on all my queries - so it shouldn't time out.

If anyone has any suggestions on how I can track this problem down - it would be much appreciated.
Thanks in advance
JRS
PS: I've set these ini settings
ini_set("display_errors", "1");
error_reporting(E_ALL);


#2 JRS

JRS
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 25 May 2006 - 02:41 AM

bump
ISP reported back Mysql server running normally without any problems. I have error report turned on - so my queries are ok - but sometimes I'm not getting data returned for my queries - other times all is fine - very confused.
JRS

#3 DapperDanMan

DapperDanMan
  • Members
  • PipPip
  • Member
  • 17 posts

Posted 25 May 2006 - 04:29 AM

Just to double check, you cannot get the problem to repeat? In other words, you do a query and get the error, doing the exact same query again gets the correct information?

DapperDanMan
[a href="http://www.brierrowstudio.com" target="_blank"]http://www.brierrowstudio.com[/a]

#4 JRS

JRS
  • Members
  • PipPipPip
  • Advanced Member
  • 45 posts

Posted 25 May 2006 - 03:50 PM

[!--quoteo(post=376892:date=May 25 2006, 12:29 AM:name=DapperDanMan)--][div class=\'quotetop\']QUOTE(DapperDanMan @ May 25 2006, 12:29 AM) View Post[/div][div class=\'quotemain\'][!--quotec--]
Just to double check, you cannot get the problem to repeat? In other words, you do a query and get the error, doing the exact same query again gets the correct information?

DapperDanMan
[/quote]
DapperDanMan,

I think I've found the problem - REGISTER_GLOBALS!!!!!!!! - it's on the ISP system - I've turned it on
my test system - still can't reproduce the problems - but making sure I'm not using the same variable names as GLOBAL variables - such as $_SESSION & $_GETs

To answer your question - the query never generated any errors only blank results. Sometimes
it would work - ie. I will get the list of the customers other times the customer list would come up blank.
At first I thought this due to bad queries that maybe be timimg out - but after putting some echo statements in the ISP system - some variables are not being set correctly (other times they are being set correctly) - very strange.

So I've decided to go through all my code to verify the $_SESSIONs & $_GETs to make sure the variable names are all different.

Thanks
JRS





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users