Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Unable to connect to database server!


gtmall

Recommended Posts

firstly i installed admin_authen2.2cvs contribution, but i couldn't login in with right username and password. then i decided uninstall the contirbution.

 

after removed this contribution, i can not access admin page, error is: unable to connect to database server.

 

I had changed back the older configre.php and application_top.php, this is the only 2 files i changed, but still same error.

 

Help!!

Link to comment
Share on other sites

this is the contribution manual,

 

Quick Setup of Admin Authentication.

 

// Open /admin/includes/application_top.php add the following code in

// include authentication user/password of administration

require(DIR_WS_INCLUDES . 'authen.php');

 

// Open /admin/includes/configure.php and add the following code in

// define admin user/password

define('ADMIN_USERNAME', 'admin');

define('ADMIN_PASSWORD', 'mypasword');

 

 

// Save the following PHP codes as authen.php in /admin/includes/authen.php

<?php

 

if(!isset($PHP_AUTH_USER))

{ header('WWW-Authenticate: Basic realm="' . TITLE . '"');

header('HTTP/1.0 401 Unauthorized');

echo $SERVER_NAME . ' Authorization Required.';

exit;

}

else

{ if (($PHP_AUTH_USER != ADMIN_USERNAME) || ($PHP_AUTH_PW != ADMIN_PASSWORD))

{ header('WWW-Authenticate: Basic realm="' . TITLE. '"');

header('HTTP/1.0 401 Unauthorized');

echo $SERVER_NAME . ' Authorization Required.';

exit;

}

}

 

?>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...