Trying to install Elitius affiliate script, but have errors

Status
Not open for further replies.

MetalMan390

Regular Member
Joined
Sep 26, 2009
Messages
284
Reaction score
18
I am trying to install the Elitius affiliate script on my site, but after the install I have a few errors. For reference, the installation instructions are here: http://www.elitius.com/docs/install.html

After I was prompted to remove the install directory (last line of the instructions, in RED), I hit next and when on this page: http://www.mydomain.com/affiliate/admin/ I was presented with these errors:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/affiliate/classes/XpDb.php on line 185

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/affiliate/classes/XpDb.php:185) in /home/xxxxxx/public_html/affiliate/admin/util.php on line 41

I have absolutely zero experience with scripting, programming, etc, so I have no idea what this means. I have included the lines of code in question below. Any help would be appreciated.

Code:
/**
    * Returns recordset as associative array where the key is the first field
    *
    * @param str $aSql sql query
    *
    * @return arr
    */
    function getKeyValue($aSql)
    {
        $out = Array ();
        $res = $this->query($aSql);
    
        while ($temp = mysql_fetch_row($res))
        {
            $out[$temp[0]] = $temp[1];
        }
        return $out;
    }

}

Code:
/**
* Checks if admin is logged in
*/
function admin_auth()
{
    global $gXpAdmin;

    if ($_COOKIE['admin_name'])
    {
        $admin = $gXpAdmin->getAdminByUsername($_COOKIE['admin_name']);

        $pwd = crypt($admin['password'], 'secret_string');
        if ($pwd != $_COOKIE['admin_pwd'])
        {
            header("Location: {$gXpConfig['base']}{$gXpConfig['dir']}{$gXpConfig['admin']}login.php");
            exit;
        }
    }
    else
    {
        header("Location: {$gXpConfig['base']}{$gXpConfig['dir']}{$gXpConfig['admin']}login.php");
        exit;
    }
}
 
Have you created a MySQL database and configured the script to use the database?
 
Have you created a MySQL database and configured the script to use the database?

Thank you for the reply. I did create a database, but I must have missed the part in the instructions telling me to modify the xpdb.php file with the database info. I just did, but I think my password is giving me another error. Now I am just getting this:

Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/research/public_html/affiliate/classes/XpDb.php on line 25

Line 25 is for the database password, and my password has a $ in it (I make very strong passwords), so I don't know if that's causing the error. So, my password line would look something like this: var $xxxxx$xxxxx;

The first $ was already therre, the middle $ is a character in my password. I then tried to change the password of the database user to something simpler for now, then changed the password in the XpDb.php file to match. Now, I am getting this error:

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'myusername'@'localhost' (using password: YES) in /home/xxxxx/public_html/affiliate/classes/XpDb.php on line 33
Could not connect: Access denied for user 'myusername'@'localhost' (using password: YES)Could not connect: Access denied for user 'myusername'@'localhost' (using password: YES)
 
Well, I just deleted the entire script from my sever and tried to reinstall. I thought that when I specified a password during the installation setup, it might not match with the new password I supplied in the xpdb.php file. So, reinstalled it and used a simpler password throughout the installation process. I am still getting the same error:

Warning: mysql_fetch_row(): supplied argument is not a valid MySQL result resource in /home/xxxxxx/public_html/affiliate/classes/XpDb.php on line 185

Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/affiliate/classes/XpDb.php:185) in /home/xxxxxx/public_html/affiliate/admin/util.php on line 41

Still getting this error even after I changed the database info in the xpdb.php file. Just to clarify, is this the code that I am supposed to be modifying in order to specify my database? It's from the xpdb.php file:


Code:
class XpDatabase
{
    var $mDbhost;
    var $mDbuser;
    var $mDbpwd;
    var $mDbname;

    /**
    * Connects to database
    */

And when I modify this, I'd change it from:

var $mDbhost;

To:

var $localhost;

Is this correct? Just replace everything in between $ and ; right?
 
I still haven't figured this out. I've reinstalled this a few times and still get those errors mentioned above. Anyone have any suggestions?
 
The most recent code you pasted shouldn't be edited with your Database info. Those are variables. There should be a line in the config file that sets a value for those variables. E.G. $mDbuser = 'Database User';

Also, have you made sure to assign the MySQL user to the database, and grant all privelages to the user for that database?
 
Hi anyone encountered this problem on elitus affiliate script,

Just trying to install the script if it will work but it seem I have a problem.
Whats seems to be the problem?

https://-=-=-=009-99--9-.000webhostapp.com/install/index.php

No one.jpg
 
Status
Not open for further replies.
Back
Top