Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

1046 - No database selected | select configuration_key as cfgKey, configuration_value as cfgValue from configuration | [TEP STOP]


lbandte

Recommended Posts

Sorry for repeating this error (also in "HELP! I stuffed my user/password in PHPMyAdmin") but I thought maybe no one would see it in there...

 

I had added a new user in PHP MyAdmin, and then changed DB user/password details in the configure.php file, but...

 

Now, when opening my osc site (on my local machine), I get the error message:

 

1046 - No database selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

 

What do I do to fix this to make it work again?

 

Thanks, Leanne

Link to comment
Share on other sites

It sounds like in your includes/configure.php file, the line:

define('DB_DATABASE', '');

 

is missing the actual name of the database.

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

AHHHH HHAAAA!!!!

 

I don't know why, but, the DB Name was wrong in the site and admin config files. WHY? How??!!!!! Strange, as it worked before, and I never touched the DB names, only the user and password details after adding a new user in PHPmyAdmin.

 

So weird, and confoozing.

 

Anyway, all fixed now, just changed the DB names in the config files. No idea WHY it had changed since it was working before.

 

Gremlins........

 

Thanks for your help!

 

Leanne

Link to comment
Share on other sites

You're welcome for the help and don't feed those gremlins after midnight. ;) LOL

"Great spirits have always found violent opposition from mediocre minds. The latter cannot understand it when a man does not thoughtlessly submit to hereditary prejudices but honestly and courageously uses his intelligence." - A. Einstein

Link to comment
Share on other sites

  • 2 years later...
You're welcome for the help and don't feed those gremlins after midnight. ;) LOL

I am still getting this error

I have check the define('DB_DATABASE,'') and edit that but i got :

 

PHP Warning: session_start() [function.session-start]: open(SESSION_WRITE_DIRECTORY\sess_0a2dd962f1548caff61b798c951fde28, O_RDWR) failed: No such file or directory (2) in C:\Domains\giftworx.co.za\wwwroot\oscom\catalog\includes\functions\sessions.php on line 97 PHP Warning: main(includes/languages/.php) [function.main]: failed to open stream: No such file or directory in C:\Domains\giftworx.co.za\wwwroot\oscom\catalog\includes\application_top.php on line 285 PHP Warning: main(includes/languages/.php) [function.main]: failed to open stream: No such file or directory in C:\Domains\giftworx.co.za\wwwroot\oscom\catalog\includes\application_top.php on line 285 PHP Warning: main(includes/languages/.php) [function.main]: failed to open stream: No such file or directory in C:\Domains\giftworx.co.za\wwwroot\oscom\catalog\includes\application_top.php on line 285 PHP Fatal error: main() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.;c:\Apps\Smarty\libs') in C:\Domains\giftworx.co.za\wwwroot\oscom\catalog\includes\application_top.php on line 285 PHP Warning: Unknown(): open(SESSION_WRITE_DIRECTORY\sess_0a2dd962f1548caff61b798c951fde28, O_RDWR) failed: No such file or directory (2) in Unknown on line 0 PHP Warning: Unknown(): Failed to write session data (files). Please verify that the current setting of session.save_path is correct (SESSION_WRITE_DIRECTORY) in Unknown on line 0

 

Should i go to each error and edit it or is the a simpler way to go about getting this to work!!

Thanks in advanced :)

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...