PHP Web Host - Quality Web Hosting For All PHP Applications Just Great Software
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
tess333
New Member
New Member


Joined: Oct 23, 2003
Posts: 5

PostPosted: Sun Jun 13, 2004 3:54 pm Reply with quote Back to top

The following two errors appreared on my site after the server went down.
I have tried to use the sql debuggers but they don't seem to work on my 5.6 version ( I know, I need to upgrade). I have also tried changing $sql_debug = 0; to $sql_debug = 1; but can't make heads or tails of it.


They are at the top of every page:

Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /usr/local/www/data.default/kidconnection/includes/sql_layer.php on line 238

Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /usr/local/www/data.default/kidconnection/includes/sql_layer.php on line 494


Has anyone seen this before? I'd appreicate any help, Thanks
Only registered users can see links on this board!
Get registered or login to the forums!


Context of sql_layer.php file for each line is below:

Line 238:
* sql_num_rows($res)
* given a result identifier, returns the number of affected rows
*/

function sql_num_rows($res)
{
global $dbtype;
switch ($dbtype) {

case "MySQL":
$rows=mysql_num_rows($res); <! Line 238 return $rows;
break;;

case "mSQL":
$rows=msql_num_rows($res);
return $rows;
break;;

case "PostgreSQL":
case "PostgreSQL_local":
$rows=pg_numrows( $res->get_result() );
return $rows;
break;;

case "ODBC":
case "ODBC_Adabas":
$rows=odbc_num_rows($res);
return $rows;
break;;

case "Interbase":
echo "<BR>Error! PHP dosen't support ibase_numrows!<BR>";
return $rows;
break;;

case "Sybase":
$rows=sybase_num_rows($res);
return $rows;
break;;

default:
break;;
}





and for line 394:


/*** Function Free Result for function free the memory ***/
function sql_free_result($res) {
global $dbtype;
switch ($dbtype) {
<! line 494
case "MySQL":
$row = mysql_free_result($res);
return $row;
break;;

case "mSQL":
$row = msql_free_result($res);
return $row;
break;;


case "PostgreSQL":
case "PostgreSQL_local":
$rows=pg_FreeResult( $res->get_result() );
return $rows;
break;;

case "ODBC":
case "ODBC_Adabas":
$rows=odbc_free_result($res);
return $rows;
break;;

case "Interbase":
echo "<BR>Error! PHP dosen't support ibase_numrows!<BR>";
return $rows;
break;;

case "Sybase":
$rows=sybase_free_result($res);
return $rows;
break;;
}
}

?>
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Sun Jun 13, 2004 4:41 pm Reply with quote Back to top

You need to set $sql_debug=1. Then, when you see the error mentioned above you will also see what block/module is causing the error. If you still can't determine which is causing it, leave the debug set to one so we can look at it and tell you which one is causing it.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
tess333
New Member
New Member


Joined: Oct 23, 2003
Posts: 5

PostPosted: Mon Jun 14, 2004 7:16 am Reply with quote Back to top

I ran the debug=1 on my homepage and have taken screen captures - as I don't want to leave my readers unable to access infrmation.
Seems to have something to do with the Stats module but I can't find it.
I have posted screen capture of the debug=1 here:


Only registered users can see links on this board!
Get registered or login to the forums!


Thanks again
-t
Only registered users can see links on this board!
Get registered or login to the forums!
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Mon Jun 14, 2004 7:24 am Reply with quote Back to top

Yep, it looks like a couple tables may have gotten corrupted. Use phpMyAdmin and do a REPAIR on your database Smile
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
Display posts from previous:       
Post new topic   Reply to topic

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum