Author |
Message |
AskAlice
Hangin' Around

Joined: Jul 07, 2004
Posts: 26
Location: Austria VIA Texas
|
Posted:
Fri Jul 23, 2004 4:40 am |
|
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. |
|
|
|
 |
Raven
Site Admin/Owner

Joined: Aug 27, 2002
Posts: 17088
|
Posted:
Fri Jul 23, 2004 6:52 am |
|
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. |
|
|
|
 |
AskAlice

|
Posted:
Tue Aug 03, 2004 4:01 am |
|
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.  |
|
|
|
 |
AskAlice

|
Posted:
Tue Aug 03, 2004 4:03 am |
|
this is line 238 of that file:
$rows=mysql_num_rows($res); |
|
|
|
 |
AskAlice

|
Posted:
Mon Aug 16, 2004 5:20 am |
|
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".  |
|
|
|
 |
Raven

|
Posted:
Sun Aug 22, 2004 10:37 pm |
|
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. | 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

|
Posted:
Mon Aug 23, 2004 12:06 am |
|
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

|
Posted:
Mon Aug 23, 2004 12:13 am |
|
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

|
Posted:
Mon Aug 23, 2004 7:41 am |
|
all three worked.  |
|
|
|
 |
Raven

|
Posted:
Tue Aug 24, 2004 6:00 am |
|
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

|
Posted:
Tue Aug 24, 2004 3:05 pm |
|
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

|
Posted:
Tue Aug 24, 2004 3:08 pm |
|
|
|
 |
AskAlice

|
Posted:
Thu Aug 26, 2004 12:29 pm |
|
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.  |
|
|
|
 |
|