Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

New Install Help (1046 - No Database Selected)


Guest

Recommended Posts

After installing OsCommerce on my webserver, and setting up my mysql db, when I try to login to the admin area I get the following error.

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

 

I can find these in the mysql db but am unsure what to do with them. Any help would be greatly appreciated.

 

Thanks;

Jeff Pihach

Link to comment
Share on other sites

After installing OsCommerce on my webserver, and setting up my mysql db, when I try to login to the admin area I get the following error.

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

I can find these in the mysql db but am unsure what to do with them. Any help would be greatly appreciated.

 

Thanks;

Jeff Pihach

Have you install your database on your server?

 

Have you checked the catalog/includes/configure.php and catalog/admin/includes/configure.php files to make sure they are configured correctly?

Link to comment
Share on other sites

Have you install your database on your server?

 

Have you checked the catalog/includes/configure.php and catalog/admin/includes/configure.php files to make sure they are configured correctly?

 

Yes the db is setup on my server and I can find the two keys that it is asking for. I am just unsure of what it means by "select...as"

 

Unfortunately I am unfamiliar with how this program runs so i dont know if my config files are setup properly. I can post them if this would help.

Link to comment
Share on other sites

Yes the db is setup on my server and I can find the two keys that it is asking for. I am just unsure of what it means by "select...as"

 

Unfortunately I am unfamiliar with how this program runs so i dont know if my config files are setup properly. I can post them if this would help.

 

 

Is the catalog secition of the site working properly? If so copy the database part of your

 

includes/configure.php file

 

to your

 

admin/includes/configure.php

 

This is the part you want to copy

 

// define our database connection

define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

The Knowledge Base is a wonderful thing.

Do you have a problem? Have you checked out Common Problems?

There are many very useful osC Contributions

Are you having trouble with a installed contribution? Have you checked out the support thread found Here

BACKUP BACKUP BACKUP!!! You did backup, right??

Link to comment
Share on other sites

Is the catalog secition of the site working properly? If so copy the database part of your

 

includes/configure.php file

 

to your

 

admin/includes/configure.php

 

This is the part you want to copy

 

// define our database connection

  define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers

  define('DB_SERVER_USERNAME', '');

  define('DB_SERVER_PASSWORD', '');

  define('DB_DATABASE', 'osCommerce');

  define('USE_PCONNECT', 'false'); // use persistent connections?

  define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

 

 

Ok I think I have found the problem, when I try to goto the catalog it redirects me to the install file. my config file looks exactly the same as the one you posted (which i am assuming is not good) I am going to do the install again, but I am curious as too why it installed all of the db files in my mysql db and did not imput them into the config files.

Link to comment
Share on other sites

Ok I think I have found the problem, when I try to goto the catalog it redirects me to the install file.

This tells me you did not DELETE the install directory after you finished the installation. YOU MUST DO THIS.

Link to comment
Share on other sites

Ok I think I have found the problem, when I try to goto the catalog it redirects me to the install file. my config file looks exactly the same as the one you posted (which i am assuming is not good) I am going to do the install again, but I am curious as too why it installed all of the db files in my mysql db and did not imput them into the config files.

 

Alright I re-did the installation and it came back saying that everything was successfull and has 2 buttons for the catalog and the admin, the catalog puts me back to the install file and the admin gives me the same error as before. Uppon checking my config files they are exactly the same as they were befor but the information has been installed in my db.

 

I think that i might have to imput the information into the config files manually. Following is my config file for my catalog and as you can see, nothing was actually imputed into the file which I find odd being that it said that everything was completed successfully.

 

// Define the webserver and path parameters

// * DIR_FS_* = Filesystem directories (local/physical)

// * DIR_WS_* = Webserver directories (virtual/URL)

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

define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers

define('ENABLE_SSL', false); // secure webserver for checkout procedure?

define('HTTP_COOKIE_DOMAIN', '');

define('HTTPS_COOKIE_DOMAIN', '');

define('HTTP_COOKIE_PATH', '');

define('HTTPS_COOKIE_PATH', '');

define('DIR_WS_HTTP_CATALOG', '');

define('DIR_WS_HTTPS_CATALOG', '');

define('DIR_WS_IMAGES', 'images/');

define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');

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

define('DIR_FS_CATALOG', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']));

define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/');

define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');

 

// define our database connection

define('DB_SERVER', ''); // eg, localhost - should not be empty for productive servers

define('DB_SERVER_USERNAME', '');

define('DB_SERVER_PASSWORD', '');

define('DB_DATABASE', 'osCommerce');

define('USE_PCONNECT', 'false'); // use persistent connections?

define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql'

?>

Link to comment
Share on other sites

By imputting the information manually into the config fiel I was able to log into the admin portion without incident, now i just hope that i didnt miss anything.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...