activeweb Posted November 9, 2008 Share Posted November 9, 2008 Hi i'm new in this forum, hope get my answer my hosting provides the following properties: mysql-5.0.22-2.2.el5_1.1 perl perl-5.8.8-10.el5_2.3 Apache/2.2.3 does these have problem with previous version of oscommecer? i installed OsCommerce on my space, but after finishing setup when i want 2 browse shop i got the following famous error: 1046 - No database selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] i searched on net and found tons of topics and solutions about this error, but non of them helped 1.both configure.php files in includes and admin/includes folders are configured correctly. (check many times) 2.permissions are set correctly, i think(if the error is relevant to permission) 3.i found a sql connection tester PHP code, i test it, it returned CONNECTION OK answer => code and instructions MORE INFO? TELL ME WHAT DO U WANT TO KNOW!? now help me plz how can i get rid of this sticky!! error Link to comment Share on other sites More sharing options...
spooks Posted November 9, 2008 Share Posted November 9, 2008 Have installed the default dbase. your cpanel shows how many sql dbases? What does phpMyAdmin show? Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 9, 2008 Author Share Posted November 9, 2008 Have installed the default dbase. your cpanel shows how many sql dbases? What does phpMyAdmin show? in Cpanel i have 2 DBs 1. myshop_phpmyc (i think this a buit-in or something, because it was made uppermost ) 2. myshop_sql (i made it through something like wizard, not in phpmyadmin section) in phpmyadmin, i have: # Server version: 5.0.22 # Protocol version: 10 # Server: Localhost via UNIX socket # User: myshop_phpmyc@localhost # MySQL client version: 5.0.22 # Used PHP extensions: mysql DBs i can see there: Home Log out Query window phpMyAdmin documentation Documentation * myshop_phpmyc (4) *myshop_sql (49) * information_schema (16) * test (0) by the way some thing that may help: as u see in cpanel below "USED" there is a green circle when i point mouse on it, it says"Used by Application" and the gray one says "Not Used by Application" Link to comment Share on other sites More sharing options...
spooks Posted November 9, 2008 Share Posted November 9, 2008 I still don't think you have the dbase, if you look at the dbase with phpMyAdmin you should see a list of tables, starting with 'address book' The default dbase has 40+ tables, so look at myshop_sql (49) check your configure.php setting, you should have: // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'xxx-x-xxx-x'); define('DB_SERVER_PASSWORD', xxxxxx); define('DB_DATABASE', 'xxx-x-xxx-x'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 9, 2008 Author Share Posted November 9, 2008 I still don't think you have the dbase, if you look at the dbase with phpMyAdmin you should see a list of tables, starting with 'address book' The default dbase has 40+ tables, so look at myshop_sql (49) check your configure.php setting, you should have: // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'xxx-x-xxx-x'); define('DB_SERVER_PASSWORD', xxxxxx); define('DB_DATABASE', 'xxx-x-xxx-x'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' This is an SC of DB and one thing about DB_DATABASE and db_USERNAME it's set to myshop_sql shouldn't be domain.com_myshop_sql ?? (anyway i already have test it, and this time another error) configure.php file: // define our database connection define('DB_SERVER', 'IPAddressOfMyDomain'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'xxxxxx_xxx'); define('DB_SERVER_PASSWORD', 'xxxxxx'); define('DB_DATABASE', 'xxxxx_xxx '); 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 More sharing options...
spooks Posted November 9, 2008 Share Posted November 9, 2008 no the define('DB_SERVER', 'localhost'); is saying where to look, remeber the dbase is on server, hence 'localhost'. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 9, 2008 Author Share Posted November 9, 2008 no the define('DB_SERVER', 'localhost'); is saying where to look, remeber the dbase is on server, hence 'localhost'. i've done what u said.... again same error check my my page if u want http://dailyshop.ir/index.php configure.php: // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'dailysho_sql'); define('DB_SERVER_PASSWORD', 'xxxxxxxxx'); define('DB_DATABASE', 'dailysho_sql '); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', ''); // leave empty '' for default handler or set to 'mysql' i'm completly disabled about this damn :angry: :angry: :angry: Link to comment Share on other sites More sharing options...
spooks Posted November 9, 2008 Share Posted November 9, 2008 Possible you dbase is empty!! use phpMyAdmin to browse configuration table, make sure it has data. Try re-installing dbase. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 9, 2008 Author Share Posted November 9, 2008 Possible you dbase is empty!! use phpMyAdmin to browse configuration table, make sure it has data. Try re-installing dbase. configuration table is not empty how to reinstall db? do u mean reinstalling oscommerce? it has no problem to do that, because it has not any important information in it Link to comment Share on other sites More sharing options...
spooks Posted November 9, 2008 Share Posted November 9, 2008 yes, do that. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 10, 2008 Author Share Posted November 10, 2008 yes, do that. Sam, thx for ur help dude, i botherd u so much and i'm so sorry for that. shop is now ON and u can see it @ dailyshop.ir but now there is a question for me here. i delete every file on server and re-upload catalog again and reinstalled it BUT BUT BUT this time in front of Data base name (in the installation proccess) i entered data1 as my dbname, whereas there was no such db in mysql dbs in Cpanel, after installation complete i checked myphp admin and i saw data1 as a created db and it has 49 entries, but there is no data1 in Cpanel yet!!?? why? and what should i backup every time i want to backup my store? the result is, this time shop came up and worked correctly :lol: Link to comment Share on other sites More sharing options...
spooks Posted November 10, 2008 Share Posted November 10, 2008 Perhaps there are server problems, it may appear on next clean up. These are good backup tools: AutoBackup Database in Admin http://addons.oscommerce.com/info/2314 Database backup manager http://addons.oscommerce.com/info/5769 Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
activeweb Posted November 10, 2008 Author Share Posted November 10, 2008 Perhaps there are server problems, it may appear on next clean up. These are good backup tools: AutoBackup Database in Admin http://addons.oscommerce.com/info/2314 Database backup manager http://addons.oscommerce.com/info/5769 The server does support backup itself, still u recommend these add-ons? Link to comment Share on other sites More sharing options...
spooks Posted November 10, 2008 Share Posted November 10, 2008 Always, the auto one provides regular auto backups, the other selective backup/restore, both with gzip, plus autobackup is compatible with manager, so install both. Sam Remember, What you think I ment may not be what I thought I ment when I said it. Contributions: Auto Backup your Database, Easy way Multi Images with Fancy Pop-ups, Easy way Products in columns with multi buy etc etc Disable any Category or Product, Easy way Secure & Improve your account pages et al. Link to comment Share on other sites More sharing options...
fzabroski Posted November 10, 2008 Share Posted November 10, 2008 I ran into a simialer problem but fixed it you see were it says define('DB_SERVER', 'localhost'); change 'localhost' to your databases ip (it will look something like define('DB_SERVER','111.111.111.111'))( you may have to contact your hosting provider for that info i did) Other then that the rest of your configure.php file looks good Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.