PDA

View Full Version : Anyone got an idea on this one?


Zach
05-24-2003, 05:30 AM
First lets start with my forums - http://fswire.com - work fine. (If you go there I am playing around with the design so ignore bad design elements).


What is bugging me is that I write my errors out to a text file on my server. Prefer not to have garbage spilled out to the users, but nicely tucked away for me to take a look at later.

I am getting one error like constantly - I delete the file all the time and had deleted it earlier today. I just ftped in for something and noticed it was at 1.2 gigs :classic:

1.2 gigs actually laughing at it more than anything, that something is throwing an error message every page view I guess, but is not causing anything not to work.

Here is the error, I have looked into it but not deeply since when I got there it was like all variables and I do not have the time to trace it back and see whats up. If nobody has a clue I will get to it sooner or later, just hoping someone has an idea that could save me a lot of time.

This is my error.



[23-May-2003 23:20:44] PHP Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home/virtual/site5/fst/var/www/html/vbadmin/db_mysql.php on line 154



but imagine thousands upon thousands of them.

Zach
05-24-2003, 05:37 AM
Just to give you an idea of frequency.

With a whopping 18 people online right now, it went from deleted file to 120K from 23:20:36 to 23:31:06.

My site is only really busy during work hours eastern and central time. (Guess people have hard jobs :))

Zach
05-24-2003, 05:39 AM
Oh, and I posted here for the obvious fact that I would never consider going to official support for a forum that is altered as much as mine is (most of it is in newthread.php, but I got junk elsewhere that I have screwed around with)

Erwin
05-24-2003, 06:38 AM
What is this line:

/home/virtual/site5/fst/var/www/html/vbadmin/db_mysql.php on line 154

Post it here.

Also, why make a log? Why not make it send an email to you, so you know what is happening. Otherwise, you may not know if something is causing an error until you check the log.

Zach
05-24-2003, 06:04 PM
148 function fetch_array($query_id=-1,$query_string="") {
149 // retrieve row
150 if ($query_id!=-1) {
151 $this->query_id=$query_id;
152 }
153 if ( isset($this->query_id) ) {
154 $this->record = mysql_fetch_array($this->query_id);
155 } else {
156 if ( !empty($query_string) ) {
157 $this->halt("Invalid query id (".$this->query_id.") on this query: $query_string");
158 } else {
159 $this->halt("Invalid query id ".$this->query_id." specified");
160 }
161 }
162
163 return $this->record;
164 }



That above is the entire funtion with the line causing the prob.


Now what has me thrown off is that I have never played in this file, and that function is crucial and everything stops with out it. So its working, I guess, just kicking out an ugly error - but we all know that makes as much sense as Mayor Daly calling the butterfly ballot illegal (Chicago uses the butterfly ballot).

Why on the emails - well, its things really do not break if I am not in the server, so getting an email would be a pain cause then I would have to go over their and just read the last one or two, and the delete the next twelve billion. They would end up going the same place I send mail from my forums, the trash bin unread. If it was a normal number maybe but when its something that when you do get you are going to get a boat load of them it makes it worthless, and checking a nice txt file is simplier and more organized.


Now the problem is this. I have no freaking clue what that funtion is doing. It could be doing anything. It almost looks like it is THE query. But again to trace back all that would take just to much time as its not in anything readable unless you just have happened to trace to it already or wrote it.

The only possibility is that files got crossed in an upgrade, but I have reloaded all new files up I believe. Then I also have issue I am more than sure of that I am using two different directories to serve admin files, /admin and /vbadmin - friggin ensigm and its stupid admin redirect.

I have a highly customized admin panel, but again I do not see that causing the problem as this is recent and that has been ripped to shreds for a long time. Really just perplexed on why it works but gives me twelve billion errors. The more I think about it the more I think it is THE query statement, what else would be used with this regularity?