Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5
Author Message
LadySyren
Regular
Regular



Joined: Sep 03, 2004
Posts: 56
Location: Iowa

PostPosted: Thu Nov 11, 2004 12:39 pm Reply with quote

I keep getting this message:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /**/***/**/***/includes/sql_layer.php on line 288
Access Denied

I'm running PHPNuke 7.5. Could someone tell me how to fix this?
 
View user's profile Send private message Send e-mail Visit poster's website AIM Address
Raven
Site Admin/Owner



Joined: Aug 27, 2002
Posts: 17088

PostPosted: Thu Nov 11, 2004 12:47 pm Reply with quote

Try this: http://www.ravenphpscripts.com/faq-2-Nuke+.html-+Troubleshooting#24
 
View user's profile Send private message
LadySyren







PostPosted: Thu Nov 11, 2004 1:42 pm Reply with quote

Ok I did that and it still comes up as:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Access Denied
 
LadySyren







PostPosted: Thu Nov 11, 2004 2:29 pm Reply with quote

Also, I noticed this as I was replying to a post on my forums:

Fatal error: Call to undefined function: opentable() in /xxxx/xxxx/public_html/xxxx/mainfile.php on line 329
 
Raven







PostPosted: Thu Nov 11, 2004 4:27 pm Reply with quote

LadySyren wrote:
Ok I did that and it still comes up as:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Access Denied
Right above this message it should tell you what table has the problem.
 
LadySyren







PostPosted: Thu Nov 11, 2004 7:46 pm Reply with quote

Alright. I had to move the echo string up two lines as I had it in the wrong place. Now it says this:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /xxxx/xxxx/public_html/xxxx/includes/sql_layer.php on line 288
Unknown column 'radmintopic' in 'field list' Access Denied

Also, I noticed this as I was replying to a post on my forums:

Fatal error: Call to undefined function: opentable() in /xxxx/xxxx/public_html/xxxx/mainfile.php on line 329

When I go to that area in the mainfile.php, this is what's there:

}

function title($text) {
OpenTable();
echo "<center><font class=\"title\"><b>$text</b></font></center>";
CloseTable();
echo "<br>";
}

function is_active($module) {
global $prefix, $db;
$module = trim($module);
$result = $db->sql_query("SELECT active FROM ".$prefix."_modules WHERE title='$module'");
$row = $db->sql_fetchrow($result);
$act = intval($row['active']);
if (!$result OR $act == 0) {
return 0;
} else {
return 1;
}
}


Last edited by LadySyren on Thu Nov 11, 2004 7:50 pm; edited 1 time in total 
Raven







PostPosted: Thu Nov 11, 2004 7:48 pm Reply with quote

Here's what is happening which is almost 100% of the time the problem. The table and the block/module calling it are not in sync. The sql is referring to a column that is not in the table.
 
LadySyren







PostPosted: Thu Nov 11, 2004 8:30 pm Reply with quote

Ok, I understand what's going on now. How do I get them in sync again? Is it something as simple as running the check database/repair tables I have in my mySQL?


Last edited by LadySyren on Thu Nov 11, 2004 8:35 pm; edited 1 time in total 
Raven







PostPosted: Thu Nov 11, 2004 8:34 pm Reply with quote

No. Either the table or the query is wrong. You have to correct whichever needs correcting, manually.
 
LadySyren







PostPosted: Thu Nov 11, 2004 9:01 pm Reply with quote

Bear with me, I'm new to this. Here's what's in there: The bolded line is line 288.

}

/*
* sql_fetch_row(&$res,$row)
* given a result identifier, returns an array with the resulting row
* Needs also a row number for compatibility with postgres
*/

function sql_fetch_row(&$res, $nr=0)
{
global $dbtype;
switch ($dbtype) {

case "MySQL":
$row = mysql_fetch_row($res);
echo mysql_error();
return $row;
break;;

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

case "postgres":
case "postgres_local":
if ( $res->get_total_rows() > $res->get_fetched_rows() ) {
$row = pg_fetch_row($res->get_result(), $res->get_fetched_rows() );
$res->increment_fetched_rows();
return $row;
} else {
return false;
}
break;;
 
Raven







PostPosted: Thu Nov 11, 2004 9:07 pm Reply with quote

You need to set $sql_debug=1; Then find out exactly what the query is that is failing. That line is not the problem; it's the pointer TO the problem.
 
LadySyren







PostPosted: Thu Nov 11, 2004 9:37 pm Reply with quote

And where do I set that?
 
Raven







PostPosted: Thu Nov 11, 2004 9:49 pm Reply with quote

In sql_layer.php
 
LadySyren







PostPosted: Thu Nov 11, 2004 10:26 pm Reply with quote

Ah great, Smile Thanks so much for all of the help. It's appreciated. I"m sure I'll be back shortly.

Edit:

I deeply apologize and feel a bit stupid right about now. I've discovered the errors and can get everything working on my own. Thank you so much for all of the help you've provided!
 
GeekyGuy
Client



Joined: Jun 03, 2004
Posts: 302
Location: Huber Heights Ohio

PostPosted: Fri Nov 12, 2004 1:22 pm Reply with quote

No need to apologize here. We've all made mistakes, and I know that I take it for granted that I'll make more.

I am glad that you have figured out what caused the problem.

_________________
"The Daytona 500 is ours! We won it, we won it, we won it!", Dale Earnhardt, February 15th, 1998, Daytona 500 
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger MSN Messenger ICQ Number
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> phpnuke 7.5

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 ©