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
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Sun Feb 08, 2009 3:13 pm Reply with quote Back to top

I upgraded a website that was running nuke 7.0 to RN 2.3.

There are a few errors with addon modules.

Your help would be greatly appreciated. Razz


This is the Profiles module with can be seen working on my website here,
Only registered users can see links on this board!
Get registered or login to the forums!


This module is very important to this woman's website and I would like to get it functional without errors again.

Code:

Warning: mysql_close(): supplied argument is not a valid MySQL-Link resource in /home2/***/public_html/modules/Profiles/index.php on line 479



Code:
Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home2/****/public_html/modules/Profiles/index.php on line 215



Here are lines 454-481 of the modules/Profiles/index.php file

Code:
#########################################################
# Submit Review                                         #
#########################################################
 function submit_proview($username, $comment, $rank, $rpid, $id) {
    global $prefix, $dbi, $username, $rank, $comment;
   
     $date = date("m-d-Y h:i a");
    
    mysql_query("insert into ".$prefix."_tri_proview values ('$id','$username','$rank','$comment','$date','delkey')", $dbi);
   
   header("Location: modules.php?name=Profiles&id=$id");
    }
   
   
   
    switch($op) {

    default:
    index($prid);
   break;
   
   case "submit_proview":
    submit_proview($username, $comment, $rank, $rpid, $id);
    break;
}
mysql_close($dbi);
include("footer.php");
?>



Here are lines 211-220

Code:
   $limitvalue = $page * $limit - ($limit);
    $sql2  = "SELECT * FROM ".$prefix."_tri_profiles where category='$cid' ORDER by common LIMIT $limitvalue, $limit";         
    $query2 = mysql_query($sql2) or die("Error: " . mysql_error());

    if(mysql_num_rows($result) == 0){
        echo("Nothing to Display!");
    }

              //$sql2="select * from ".$prefix."_tri_profiles where category='$cid' ORDER BY common";
       //$query2 = mysql_query($sql2);


Last edited by jaded on Sun Feb 08, 2009 4:37 pm; edited 1 time in total
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Feb 08, 2009 3:28 pm Reply with quote Back to top

It uses the old $dbi layer as stated in one of your other issues. You need to convert it to the $db layer or enable the $dbi layer again. Both are located here in the forums.
View user's profile Send private message
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Sun Feb 08, 2009 3:30 pm Reply with quote Back to top

I have done that and it did not fix the error. It corrected it with the Contact Plus module, but not with this Profiles module.
View user's profile Send private message Visit poster's website
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Feb 08, 2009 4:04 pm Reply with quote Back to top

I think you can just comment out the mysql_close($dbi);.

Try changing:
Code:

if(mysql_num_rows($result) == 0){


To:
Code:

if(sql_num_rows($result, $dbi) == 0){
View user's profile Send private message
Palbin
Site Admin


Joined: Mar 30, 2006
Posts: 2456
Location: Pittsburgh, Pennsylvania

PostPosted: Sun Feb 08, 2009 4:06 pm Reply with quote Back to top

jaded wrote:
I have done that and it did not fix the error. It corrected it with the Contact Plus module, but not with this Profiles module.


I guess I should have asked. When you said that it corrected it did you change the $dbi to $db or uncomment the stuff in mainfile.php.
View user's profile Send private message
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1191

PostPosted: Sun Feb 08, 2009 4:06 pm Reply with quote Back to top

Try these:

I assume the first two you posted were just the error messages.

Code:
#########################################################
# Submit Review                                         #
#########################################################
 function submit_proview($username, $comment, $rank, $rpid, $id) {
    global $prefix, $db, $username, $rank, $comment;
   
     $date = date("m-d-Y h:i a");
     
    $db->sql_query("insert into ".$prefix."_tri_proview values ('$id','$username','$rank','$comment','$date','delkey')");
   
   header("Location: modules.php?name=Profiles&id=$id");
    }
   
   
   
    switch($op) {

    default:
    index($prid);
   break;
   
   case "submit_proview":
    submit_proview($username, $comment, $rank, $rpid, $id);
    break;
}
$db->sql_close($db);
include("footer.php");
?>


Code:
   $limitvalue = $page * $limit - ($limit);
    $sql2  = "SELECT * FROM ".$prefix."_tri_profiles where category='$cid' ORDER by common LIMIT $limitvalue, $limit";         
    $query2 = $db->sql_query($sql2) or die("Error: " . $db->sql_error());

    if($db->sql_numrows($result) == 0){
        echo("Nothing to Display!");
    }

              //$sql2="select * from ".$prefix."_tri_profiles where category='$cid' ORDER BY common";
       //$query2 = $db->sql_query($sql2);



Hope so ...

Cheers
View user's profile Send private message
jaded
Theme Guru


Joined: Nov 01, 2003
Posts: 1006

PostPosted: Sun Feb 08, 2009 4:36 pm Reply with quote Back to top

Hello,

These changes from Dad7732 removed the notices in this module. I have not found any additonal ones within the module as of now. I truly appreciate your help with this. Thank you both!
View user's profile Send private message Visit poster's website
dad7732
RavenNuke(tm) Development Team


Joined: Mar 18, 2007
Posts: 1191

PostPosted: Sun Feb 08, 2009 4:55 pm Reply with quote Back to top

My info and help is solely dependant on the crew here. I went through the same thing a while back and it's easy to miss a step or two just when you KNOW you modified everything. Smile

Cheers
View user's profile Send private message
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