Jump to content

Archived

This topic is now archived and is closed to further replies.

JRS

How to debug intermittent problem?

Recommended Posts

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);

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
[!--quoteo(post=376892:date=May 25 2006, 12:29 AM:name=DapperDanMan)--][div class=\'quotetop\']QUOTE(DapperDanMan @ May 25 2006, 12:29 AM) [snapback]376892[/snapback][/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

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.