Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What is wrong with my site?


happyday

Recommended Posts

What is wrong with my site...I edited a few things and this is what I get

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

What is going on?

Link to comment
Share on other sites

What is wrong with my site...I edited a few things and this is what I get

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

What is going on?

 

Sounds like your catalog/includes/configure.php file does not have the right information in it about your database. Have a look at that file.

Backup before making changes. Backup before making changes! Backup before making changes!!

 

You did do a backup? eh?

Link to comment
Share on other sites

Sounds like your catalog/includes/configure.php file does not have the right information in it about your database. Have a look at that file.

How do I know if the file does not have the right information

Link to comment
Share on other sites

It seems like your catalog cannot find the database.

 

The possibly missing info would be at the bottom of catalog/includes/configure.php

 

// define our database connection

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

define('DB_SERVER_USERNAME', 'yourusername');

define('DB_SERVER_PASSWORD', 'yourpassword');

define('DB_DATABASE', 'nameofyourdatabase');

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

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

 

How do I know if the file does not have the right information

 

If your admin side is still working w/no problems, then open up your catalog/admin/includes/configure.php and you can find your database info there too. DO NOT just fully copy the file...the 2 configure.php files are different...but your database name, server, username, and password settings would be the same in both files.

 

 

Hope it makes sense.

Link to comment
Share on other sites

It seems like your catalog cannot find the database.

 

The possibly missing info would be at the bottom of catalog/includes/configure.php

 

// define our database connection

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

define('DB_SERVER_USERNAME', 'yourusername');

define('DB_SERVER_PASSWORD', 'yourpassword');

define('DB_DATABASE', 'nameofyourdatabase');

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

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

If your admin side is still working w/no problems, then open up your catalog/admin/includes/configure.php and you can find your database info there too. DO NOT just fully copy the file...the 2 configure.php files are different...but your database name, server, username, and password settings would be the same in both files.

Hope it makes sense.

I copy and paste but it doesn't seem to work, I even made change and my configuration.php...I change configure_value and configure_key into cfgValue and cfgKey....

But it still show up as.....

 

1054 - Unknown column 'configuration_key' in 'field list'

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

What am I doing wrong?

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...