PHP Script Error

Discussion in 'PHP' started by quamism, Feb 19, 2006.

  1. #1
    I have just transfered this site to my server and i am receiving an error when loading the index page. The error is as below:

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/zeeimage.com/httpdocs/database.php on line 317

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/zeeimage.com/httpdocs/database.php on line 320

    Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/zeeimage.com/httpdocs/database.php on line 317

    Warning: mysql_free_result(): supplied argument is not a valid MySQL result resource in /var/www/vhosts/zeeimage.com/httpdocs/database.php on line 320
    Can't find Source Server!

    The Code Lines are as follows:

    } */

    $cur= $this->_cursor;
    $ret = null;
    if ($row = mysql_fetch_assoc( $cur )) {
    $ret = $row;
    }
    mysql_free_result( $cur );
    //$this->_cursor ='';
    return $ret;
    }

    Any help from my fellow DPers would be great!

    Thanks
     
    quamism, Feb 19, 2006 IP
  2. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #2
    Is there a new db name or db password on the new server?
     
    noppid, Feb 19, 2006 IP
  3. Lordo

    Lordo Well-Known Member

    Messages:
    2,082
    Likes Received:
    58
    Best Answers:
    0
    Trophy Points:
    190
    #3
    It could be the query itself. Maybe the query depends on a $_GET value and the setting of global variables is different from your server. What is the query?
     
    Lordo, Feb 19, 2006 IP
  4. quamism

    quamism Active Member

    Messages:
    413
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    58
    #4
    Yes, there was a new database name for the new server. I thought i updated that info in the config file already though. I will double check to make sure that the database name, username, and PW are all entered correctly.
     
    quamism, Feb 19, 2006 IP
  5. noppid

    noppid gunnin' for the quota

    Messages:
    4,246
    Likes Received:
    232
    Best Answers:
    0
    Trophy Points:
    135
    #5
    Check for any paths defined in the files as well. They would have likely changed as well.
     
    noppid, Feb 19, 2006 IP
  6. mehbooba

    mehbooba Peon

    Messages:
    260
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    0
    #6
    usually such errors occur because you have the :

    1. database url wrong
    2. database name wrong or
    3. database username or password wrong
     
    mehbooba, Feb 25, 2006 IP
  7. tccoder

    tccoder Peon

    Messages:
    69
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Yup its most probably the forum configs.. possibly the table names... anything of that sort.. double check everything..
     
    tccoder, Mar 7, 2006 IP