Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1046 - No Database Selected


Guest

Recommended Posts

Because I've messed up my admin area trying to install user access, I've just copied and pasted all the original admin files over what I had there so I could start again. Not as simple as I thought. I've got the following error message:

 

"1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]"

 

I desperately need help in getting my admin site back to normal. Please, please help!

 

Damian

Link to comment
Share on other sites

If you have copied over the admin then you will have also replaced the admin/includes/configure.php

 

you can get the database information required from catalog/includes/confiure.php

 

the information is at the bottom of the file, copy this information to your admin/includes/configure.php

 

do not copy the file catalog/includes/configure.php as your admin/includes/configure.php as they are different files with different paths, only copy the database information.

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Steve

 

Thank you very much. That has cleared that one up.

 

Unfortunately it's left me with another and your help would be really appreciated.

 

"Fatal error: Call to undefined function: tep_admin_check_boxes() in /home/pmtzqmjy/public_html/php/admin/index.php on line 24"

 

Thanks again

 

Damian

Link to comment
Share on other sites

did you have admin access with levels contribution installed

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

The problem is that I had the basic set up and I tried to instal various contributions for admin access, all of which failed. Since then I haven't been able to get back to normal.

 

All I want is to get back to a normal admin, even if it means removing any admin settings I have previously installed.

 

I'm not even sure if the version of osCommerce that I'm using is the same as the admin files that I downloaded.

 

Sorry for not being much use, but your help is really much appreciated. I've been at this for two days now.

 

Regards

 

Damian

Link to comment
Share on other sites

the

tep_admin_check_boxes

is part of a functions set for admin access with levels contribution.

 

Do you have a lot of contributions installed?

 

I am asking you some questions in order to determine what is the best course of action for you to recover to normal

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

the
tep_admin_check_boxes

is part of a functions set for admin access with levels contribution.

 

Do you have a lot of contributions installed?

 

The access levels was the first contribution I tried to install. Obviously not that well.

 

I have no others installed. My main site has been tailored only by CSS changes, and different images.

Link to comment
Share on other sites

ok if you have no other contributions installed and you are using osCommerce version 2.2MS2 then download the complete kit from here un pack on your local machine then upload the admin directory minus the admin/includes/configure.php file.

 

if you look at the codes for includes/application_top.php you will be able to get the information on which version you have

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

ok if you have no other contributions installed and you are using osCommerce version 2.2MS2 then download the complete kit from here un pack on your local machine then upload the admin directory minus the admin/includes/configure.php file.

 

if you look at the codes for includes/application_top.php you will be able to get the information on which version you have

 

I thought I'd done that already but I decided to do it all again just in case and I'm nearly back on.

 

Or so I thought.... For some reason all the links from the main page are wrong. They are linking to "mydomain/admin" instead of "mydomain/php/admin"

Link to comment
Share on other sites

ok that will be a wrong path in your configure.php file

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

ok that will be a wrong path in your configure.php file

 

I've had a look and there's loads of different things which I've tried changing, but changing one thing seems to mess up another.

 

The directories seem to be all different to what they used to be. It might be something to do with me using a different version, but I really don't know. Is there any chance you could explain of the following what needs to change:

 

define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers

define('HTTP_CATALOG_SERVER', '');

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/');

Link to comment
Share on other sites

as your catalog side is working can you post the catalog/includes/configure.php

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

After mucho tinkering and getting it wrong, I've finally got it right and now it's all working.

 

I cannot express how much I really appreciate your ongoing support in getting me back to how it was. I'm going to back everything up before I attempt the user access thing again.

 

If ever I get to understand how all this works, I'll glady try and contribute, but I think I'm a few more cock-ups away from that.

 

Thanks again!

 

Damian

Link to comment
Share on other sites

A point to remember is to allways keep a backup of your files AND DATABASE prior to installing any contribution, that way if it does not work then you can revert to before the install. :D

 

Hope you have better luck with the next one :thumbsup:

No longer giving free advice. Please place deposit in meter slot provided.  Individual: [=] SME: [==] Corporation: [===]
If deposit does not fit one of the slots provided then you are asking too much! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...