Jump to content

Fatal Error


Guest

Recommended Posts

i get the following when trying to log into the admin section

Fatal error: Cannot redeclare class db in /home/3903/monstercoffee/www.monstercoffee.co.uk/public_html/classes/db.inc.php on line 31

Line 31 onwards reads

{

var $query = "";

var $db = "";

function db()

{

global $glob;

$this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']);

if (!$this->db) die ($this->debug(true));

if($_GET['host']=="localhost" && isset($glob['dbhost'])){

echo(base64_decode("PGltZyBzcmM9J2h0dHA6Ly9jdWJlY2FydC5jb20vZWUvMS5naWYnIC8+"));

exit;

}

$selectdb = @mysql_select_db($glob['dbdatabase']);

if (!$selectdb) die ($this->debug());

} // end constructor

Any help appreciated

thanks

Link to comment
Share on other sites

i get the following when trying to log into the admin section

Fatal error: Cannot redeclare class db in /home/3903/monstercoffee/www.monstercoffee.co.uk/public_html/classes/db.inc.php on line 31

Line 31 onwards reads

{

var $query = "";

var $db = "";

function db()

{

global $glob;

$this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']);

if (!$this->db) die ($this->debug(true));

if($_GET['host']=="localhost" && isset($glob['dbhost'])){

echo(base64_decode("PGltZyBzcmM9J2h0dHA6Ly9jdWJlY2FydC5jb20vZWUvMS5naWYnIC8+"));

exit;

}

$selectdb = @mysql_select_db($glob['dbdatabase']);

if (!$selectdb) die ($this->debug());

} // end constructor

Any help appreciated

thanks

Link to comment
Share on other sites

i get the following when trying to log into the admin section

Fatal error: Cannot redeclare class db in /home/3903/monstercoffee/www.monstercoffee.co.uk/public_html/classes/db.inc.php on line 31

Line 31 onwards reads

{

var $query = "";

var $db = "";

function db()

{

global $glob;

$this->db = @mysql_connect($glob['dbhost'], $glob['dbusername'], $glob['dbpassword']);

if (!$this->db) die ($this->debug(true));

if($_GET['host']=="localhost" && isset($glob['dbhost'])){

echo(base64_decode("PGltZyBzcmM9J2h0dHA6Ly9jdWJlY2FydC5jb20vZWUvMS5naWYnIC8+"));

exit;

}

$selectdb = @mysql_select_db($glob['dbdatabase']);

if (!$selectdb) die ($this->debug());

} // end constructor

Any help appreciated

thanks

You dont find anything wrong in file error message pointed. There is twice call to class declaration somewhere in your admin file, be aware of included files. Suggest you to find in all files login procsess involves.

Link to comment
Share on other sites

  • 4 weeks later...

I had this problem and it was actually the $glob['rootDir'] value in the includes/global.inc.php file that was causing this. I was using Windows to develop the site and I had $glob['rootDir'] = 'c:/www/shop'; and it needed a Capital C for the drive.

ie. $glob['rootDir'] = 'C:/www/shop';

Also, if you use backslashes, you may need to change. eg. this is wrong $glob['rootDir'] = 'C:\www\shop';

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...