Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
AskAlice
Hangin' Around



Joined: Jul 07, 2004
Posts: 26
Location: Austria VIA Texas

PostPosted: Fri Jul 23, 2004 4:40 am Reply with quote

I am having a small problem with the Site_Info Block

it gets this error but, when i turn it off and then later back on it often goes away and functions correctly.

this is the error I am getting:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtua21/public_html/community/includes/sql_layer.php on line 238

Any ideas what I am doing wrong?

Iam using phpnuke7.2 with the patches. Upgradnd to another version is not an option I really want to take on right now.
 
View user's profile Send private message Visit poster's website
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Fri Jul 23, 2004 6:52 am Reply with quote

This sounds like you might be having MySQL problems, especially since it comes and goes. In db/sql_layer.php, set the sql_debug setting to 1. Then you will see all kinds of sql messages on your screen. Right above this warning, however, you should then see what sql statement was attempted. That will tell you what table was being accessed when the error occurs.
 
View user's profile Send private message
AskAlice







PostPosted: Tue Aug 03, 2004 4:01 am Reply with quote

This is the message I got with the debug on 1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtua21/public_html/community/includes/sql_layer.php on line 238
SQL query: SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='3'
SQL query: SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='2'
SQL query: SELECT sum(hits) FROM nuke_stats_year

At the moment it is still Greek to me. Embarassed
 
AskAlice







PostPosted: Tue Aug 03, 2004 4:03 am Reply with quote

this is line 238 of that file:

$rows=mysql_num_rows($res);
 
AskAlice







PostPosted: Mon Aug 16, 2004 5:20 am Reply with quote

I am wondering if the suPHP my server uses is making this not work correctly. What drives me crazy this is the only block I have found that actually Hides the "Hidden users". Bang Head
 
Raven







PostPosted: Sun Aug 22, 2004 10:37 pm Reply with quote

AskAlice wrote:
This is the message I got with the debug on 1

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtua21/public_html/community/includes/sql_layer.php on line 238
SQL query: SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='3'
SQL query: SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='2'
SQL query: SELECT sum(hits) FROM nuke_stats_year

At the moment it is still Greek to me. Embarassed
This would indicate that either those 2 tables do not exists or they are empty. Use phpMyAdmin and examine those 2 tables to see if there are any entries in the tables that match that criteria.
 
AskAlice







PostPosted: Mon Aug 23, 2004 12:06 am Reply with quote

Hi Raven,

Thanks for your reply. I have checked out the database and the files exsist, have data and look like they are correct. This problem seems to have started with the installation of suPHP on our servers, since I had the same type of problem with the forums afterwards.

I have installed a new clean version of the block and am testing it to see if maybe that fixed it. I am crossing my fingers.
 
Raven







PostPosted: Mon Aug 23, 2004 12:13 am Reply with quote

If it still does not work, use phpMyAdmin and run these 3 queries in the SQL window to see if they work or not. That will help eliminate nuke from the equation.

SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='3' ;

SELECT hits FROM nuke_stats_date WHERE year='2004' AND month='8' AND date='2' ;

SELECT sum(hits) FROM nuke_stats_year ;
 
AskAlice







PostPosted: Mon Aug 23, 2004 7:41 am Reply with quote

all three worked. Confused
 
Raven







PostPosted: Tue Aug 24, 2004 6:00 am Reply with quote

What are the lines right ABOVE this message?

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/virtua21/public_html/community/includes/sql_layer.php on line 238
 
AskAlice







PostPosted: Tue Aug 24, 2004 3:05 pm Reply with quote

Their is no message above it. this is the message when the debug is on 0.

Howvever I also am getting this message in another module now. so it has to be related to something other then this block. Thanks for all your help.
 
Raven







PostPosted: Tue Aug 24, 2004 3:08 pm Reply with quote

Turn degug to 1.
 
AskAlice







PostPosted: Thu Aug 26, 2004 12:29 pm Reply with quote

Actually I think I solved the the problem by editing the file and removing the hits and page view part which I did not need anyways and by doing this I discovered it is now the perfect block for my needs...

Thank you for all your help and patience. Cheers
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©