0

Hi,

Installing a new script....

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 4

Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/config.php on line 5


Warning: mysql_fetch_array() expects parameter 1 to be resource, boolean given in /home/content/13/11394913/html/index.php on line 35

Index shows up but with errors.

config file

<?php
include "connect.php";  
$settings = mysql_query ('select * from settings'); 
$settingrecord = mysql_fetch_array($settings);    
while ($settingrecord = mysql_fetch_array($settings))
{
    switch ($settingrecord["name"])
    {
        case "sitename":            
        $sitename = $settingrecord["setting"];
        $sitenamesafe = htmlentities($sitename);            
        break;        
        case "adminid":
        $adminid = $settingrecord["setting"];       
        break;       
        case "adminpw":     
        $adminpw = $settingrecord["setting"]; 
        break;   
        case "paypal":
        $paypal = $settingrecord["setting"];   
        break;      
        case "stormpay":
        $stormpay = $settingrecord["setting"];
        break; 
        case "safepay":
        $safepay = $settingrecord["setting"];            
        break;     
        case "solidtrust":
        $solidtrust = $settingrecord["setting"];   
        break;
        case "adminemail":
        $adminemail = $settingrecord["setting"];
        break;           
        case "prointerval":
        $prointerval = $settingrecord["setting"];            
        break;      
        case "basecolour":
        $basecolour = $settingrecord["setting"];  
        break;      
        case "contrastcolour":          
        $contrastcolour = $settingrecord["setting"];            
        break;        
        case "fonttype";
        $fonttype = $settingrecord["setting"];    
        break;       
        case "fontcolour":
        $fontcolour = $settingrecord["setting"];
        break;        
        case "freepost":            
        $freepost = $settingrecord["setting"];            
        break;        
        case "propost":         
        $propost = $settingrecord["setting"];            
        break;        
        case "domain":          
        $domain = $settingrecord["setting"];            
        break;        
        case "com1":            
        $com1 = $settingrecord["setting"];            
        break;        
        case "com2":                
        $com2 = $settingrecord["setting"];            
        break;        
        case "com3":
        $com3 = $settingrecord["setting"]; 
        break;        
        case "com4":   
        $com4 = $settingrecord["setting"]; 
        break;        
        case "com5":    
        $com5 = $settingrecord["setting"];   
        break;    
        case "ups":  
        $ups = $settingrecord["setting"];    
        break;        
        case "adminfee":  
        $adminfee = $settingrecord["setting"];
        break;     
        case "rand": 
        $rand = $settingrecord["setting"];           
        break;        
        case "freecommission" :          
        $freecommission = $settingrecord["setting"];             
        break;        
        case "procommission" :          
        $procommission  = $settingrecord["setting"];            
        break;
    }
}   
if( isset($_SESSION['ulogin']) && $_SESSION['ulogin'])
{
    $userinfo=mysql_query ("select * from members where userid='".$_SESSION[uname]."'");        
    $userrecord=mysql_fetch_array($userinfo);        
    $id=$userrecord["id"];        
    $name=$userrecord["name"];        
    $contact_email=$userrecord["contact_email"];        
    $subscribed_email=$userrecord["subscribed_email"];        
    $paypal_email=$userrecord["paypal_email"];        
    $stormpay_email=$userrecord["stormpay_email"];        
    $safepay_email=$userrecord["safepay_email"];        
    $solidtrust_email=$userrecord["solidtrust_email"];        
    $contact_email=$userrecord["contact_email"];        
    $password=$userrecord["pword"];        
    $userid=$userrecord["userid"];        
    $status=$userrecord["status"];        
    $referid=$userrecord["referid"];        
    $verified=$userrecord["verified"];        
    $solos=$userrecord["solos"];        
    $points=$userrecord["points"];        
    $commission=$userrecord["commission"];        
    $ip=$userrecord["ip"];        
    $joindate=$userrecord["joindate"];        
    $lastpost=$userrecord["lastpost"];        
    $subscribed=$userrecord["subscribed"];        
    $memtype=$userrecord["memtype"];        
    $up=$userrecord["up"];        
    $random=$userrecord["random"];        
    $hits_unique=$userrecord["hits_unique"];    
    $hits_visitor=$userrecord["hits_visitor"];
}
?>

index file

<?php

include "config.php";
$get_referid = $_GET['referid'];
if (!empty($get_referid)) {

    $get_referid = addslashes($get_referid);

    if($_COOKIE['referid']!=$get_referid) mysql_query("UPDATE members SET hits_unique=hits_unique+1,hits_visitor=hits_visitor+1 WHERE userid='$get_referid'");

    else mysql_query("UPDATE members SET hits_visitor=hits_visitor+1 WHERE userid='$get_referid'");

    if(mysql_affected_rows()){

        setcookie('referid', $_GET['referid'], time()+365*24*60*60);

        setcookie('referrer', $_SERVER['HTTP_REFERER'], time()+365*24*60*60);

    }

}



include "header.php";

    echo '<center>';

    $query1 = "SELECT * FROM pages WHERE name='Index (Main) Page'";

    $result1 = mysql_query ($query1);



    $line1 = mysql_fetch_array($result1);

         $htmlcode = stripslashes($line1["htmlcode"]);







    echo $htmlcode;


include "footer.php";

mysql_close($dblink);

?>

Thanks!!
L-D

2
Contributors
5
Replies
23
Views
4 Years
Discussion Span
Last Post by pritaeas
0

Those errors mean that the query failed. My guess is the connect script is using the wrong database credentials.

0

Interesting... backspace a bit...

This is a revision of a script I had been trying to use... It had old session registered, etc. Now it has been updated. I purchased it (lic) yesterday.

Anyway, I had set up a fresh DB and imported sql. I'll email the script source for help.

Yeah, I know, but I wanted to see what you guys had to say.

L-D

2

Try this:

$settings = mysql_query ('select * from settings') or die(mysql_error()); 

to get a better error message.

I find it disturbing that someone sells a script that still uses the MySQL extension.

Edited by pritaeas

0

Beats me, but then I don't know the diff.

It looks like I forgot to upload sql. Ok, have a good laugh! I think my hat is too tight!

Here is what I get... (yellow background)

Error
You attempted to load file with unsupported compression (application/gzip). Either support for it is not implemented or disabled by your configuration.

I already unzipped the main folder... I usually upload sql.tex.

Doesn't look like a zipped file but it does say sql.sql rather than txt. What do I do? Is it zipped? How do I crack it open?

The script guy said

"Did you upload your database to the phpmyadmin?

If so did you go to the connect file and put the database info in?

That's what it looks like needs to be done".

So, that's where I'm at.

Thanks for the tip but the problem seems to be out in the open.

L-D

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.