Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Can't access admin area after making changes


10incher

Recommended Posts

Stupid me, I changed the name of my admin folder by accident then changed it back. I also re-uploaded configuration.php in the admin folder. Now when I go to access my admin area, all I get is this error:

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

How can I fix this, obviously its not connecting to my database? Please help.

Link to comment
Share on other sites

It sounds like you may have overwritten your admin/includes/configure.php file. You need to make sure it is setup correctly.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Link to comment
Share on other sites

Yep, I think that is what I did, anyone know what I have to change manually to fix it? Should I just run the setup program again, and if so would it alter anything else?

 

It sounds like you may have overwritten your admin/includes/configure.php file. You need to make sure it is setup correctly.

 

Jack

Link to comment
Share on other sites

Well, I re-configured my admin/includes/configure.php file, and I think I got it right. Here is what it looks like (this is with a made up database name and password, not my real ones)

 

  Copyright (c) 2002 osCommerce

 Released under the GNU General Public License
*/

// define our webserver variables
// FS = Filesystem (physical)
// WS = Webserver (virtual)
 define('HTTP_SERVER', 'http://www.action-figures.ca'); // eg, http://localhost or - 

https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.action-figures.ca');
 define('HTTPS_CATALOG_SERVER', '');
 define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module
 define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. 

if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs)
 define('DIR_WS_ADMIN', '/admin/');
 define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN);
 define('DIR_WS_CATALOG', '/catalog/');
 define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG);
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');
 define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/');
 define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/');
 define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/');
 define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/');

// define our database connection
 define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'madeupusername');
 define('DB_SERVER_PASSWORD', 'madeuppassword');
 define('DB_DATABASE', 'madeupdatabasename');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');
?>

 

I can now get to my admin index, but any of the admin options I choose show the following error:

 

Not Found

The requested URL /admin/customers.php was not found on this server.

 

Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.

 

All the files are there and were never altered or touched. Is this a simple case of re-setting my file permissions on the admin folder? Anybody know what may be wrong?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...