Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

new admin help


Sleeping_beauty

Recommended Posts

I tried to log into my admin the other day and received a 404- Not Found error. So I log into my cpanel and WTF, my admin folder is completely gone, totally non existent. Now I've FTP'd a plain vanilla copy of the OSC admin folder to my directory and get this error:

 

 

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'mysql'@'localhost' (using password: NO) in /home/sleeping/public_html/admin/includes/functions/database.php on line 19

Unable to connect to database server!

 

 

How do I fix this so i can access admin again and add in the missing files i need to put my mildly modded site back to normal?

 

MTIA!!

Link to comment
Share on other sites

First off, your host may make periodic snapshots of your site as backups so check that first. The vanilla admin directory is ok, so long as you haven't made any admin side modifications. Obviously if you had, you'll need to re-install them. That beside, you also need to add the correct information to the new admin/includes/configure.php file. You will be able to get most of the info from catalog/includes/configure.php.

Link to comment
Share on other sites

First off, your host may make periodic snapshots of your site as backups so check that first. The vanilla admin directory is ok, so long as you haven't made any admin side modifications. Obviously if you had, you'll need to re-install them. That beside, you also need to add the correct information to the new admin/includes/configure.php file. You will be able to get most of the info from catalog/includes/configure.php.

 

 

I realize I'm going to have to put any missing files from my mods back into the vanilla admin, but thats no big issue.

I looked for an older backup, but it looks like it took a fresh snapshot early this morning, so that was no help to me.

 

I changed any config.php info that was missing from the admin file. and now im getting a new error message:

 

1146 - Table 'sleeping_osc1.administrators' doesn't exist

 

select id from administrators limit 1

 

[TEP STOP]

 

 

more TIA

Link to comment
Share on other sites

It looks like the vanilla admin you uploaded is from RC1, where the original was MS2. I'm not sure what impact it will have if you were to keep the one you have now as RC1 has a slightly different directory structure and files. Not to mention the database tables, as you have discovered.

If you want the admin from MS2, PM me your email addy and I will send it to you.

Link to comment
Share on other sites

It looks like the vanilla admin you uploaded is from RC1, where the original was MS2. I'm not sure what impact it will have if you were to keep the one you have now as RC1 has a slightly different directory structure and files. Not to mention the database tables, as you have discovered.

If you want the admin from MS2, PM me your email addy and I will send it to you.

 

 

Thanks for the right admin folder. I've nearly got it now, I think...

 

I really hate parse errors and feel so dumb when i see one pointed out to me but... heres the code, and what's the fix for:

 

Parse error: syntax error, unexpected T_STRING in /......../adminsection/includes/configure.php on line 16

 

<?php
/*
 $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $

 osCommerce, Open Source E-Commerce Solutions
 http://www.oscommerce.com

 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.sleepingbeautydesigns.com); // eg, http://localhost or - https://localhost should not be NULL for productive servers
 define('HTTP_CATALOG_SERVER', 'http://www.sleepingbeautydesigns.com');
 define('HTTPS_CATALOG_SERVER', 'https://www.sleepingbeautydesigns.com');
 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', 'xxxxxxxxxxx');
 define('DB_SERVER_USERNAME', 'xxxxxxxxxx');
 define('DB_SERVER_PASSWORD', 'xxxxxxxxxx');
 define('DB_DATABASE', 'xxxxxxxxxx');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', '');
?>

Link to comment
Share on other sites

  define('HTTP_SERVER', ''http://www.sleepingbeautydesigns.com);

Should be:

 

  define('HTTP_SERVER', 'http://www.sleepingbeautydesigns.com');

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Link to comment
Share on other sites

Elizabeth,

 

For the sake of security, you may want to consider changing your database information on your server. You have posted way too much info on here.

 

Another security issue, being as you are on a shared server, you should store sessions to the database. Make the last line in both configure files like this:

 

define('STORE_SESSIONS', 'mysql');

 

 

Note to the moderators: Please edit Sleeping_beauty's last post.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...