Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

"1046 - No Database Selected" after install and ad


Recommended Posts

After install and setting up configuration in admin I get the following message at "online catalog" and when attempting to access anything beyond the /catalog/default.php page:

 

================

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

================

 

I thought I had the database already selected, but I obviously I am missing something. Any pointers in the right direction would be appreciated.

 

Thanks

Link to comment
Share on other sites

I have tried following the instructions in "How To Install TEP Database Securely" without success. I can get to the database via phpmyadmin and I see the database there.

 

When set up, the host-server makes the "catalog" name "username_catalog". This was set in the first section of the installation, but I am wondering if I need to change something else to accomodate this.

 

Thanks.

Link to comment
Share on other sites

  • 3 months later...

Yeah I uploaded a know working site, its 100% on localhost but I get the following;

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

[TEP STOP]

 

Dam its frustrating me can anyone shed some light and guide me on the right path, not the garden pasth lol ;)

Cheers

 

MickTheFish

Link to comment
Share on other sites

You have to add the database information in your admin/configure.php

 

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

 

define('DB_SERVER_USERNAME', 'your database username');

 

define('DB_SERVER_PASSWORD', 'your database password');

 

define('DB_DATABASE', 'your database name');

 

Good Luck ;)

Link to comment
Share on other sites

  • 2 weeks later...

Well I've read through the posting and still have not solved the problem. I'm including a copy of the code for suggestion to fix this. The names have been changed to protect the innocent.

 

1046 - No Database Selected

 

select configuration_key as cfgKey, configuration_value as cfgValue from configuration

 

[TEP STOP]

 

define('DB_SERVER', 'localhost');
 define('DB_SERVER_USERNAME', 'jane_doe');
 define('DB_SERVER_PASSWORD', 'Mary29');
 define('DB_DATABASE', 'user_osCommerce');
 define('USE_PCONNECT', 'false');
 define('STORE_SESSIONS', 'mysql');

 

Thank you,

Sinbad

"Mine is not the only way, mine is just another way

Link to comment
Share on other sites

Hi Sinbad,

 

I had the same problem and also searched all the posts without success. I then did a clean install and checked the file permissions and found that catalog/includes/configure.php was 644 on ftp'd installation and 744 (giving Owner Execute permission) on the clean installation.

 

Changed the permissions on the uploaded file and now everything is fine.

 

Hope this helps, Kelvin

If it was easy everyone would be doing it......

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...