deathgod Posted September 27, 2006 Posted September 27, 2006 Hey all, I am getting the following error message: 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] Go to http://www.zashop.co.za/ to view it yourself. I am no expert when it comes to database stuff, but a calculated guess would be - the error means that it has come across 'select' statements to run on a database but has no database to run it on. The problem is that I have got a database, with user etc..... but still get this problem. I have updated the configure.php to the new domains specs so i dont think it is there, but i am sure i have missed something obvious somewhere else. Anyone have ideas? Nick Edit: I'll be checking in later when i have more time. ciao. Menou and unome
deathgod Posted September 27, 2006 Author Posted September 27, 2006 UPDATE: 1/ I have quadruple chacked my configure.php files and they are correct to me. 2/ So i deleted my old database and created a new one from scratch and that hasn't worked either. 3/ I have searched the forums and the only advice i can find is, edit your configure.php files to reflect your new specs, which i have done. But i may have got it wrong so here it is the catalog one <?php /* osCommerce, Open Source E-Commerce Solutions [url=http://www.oscommerce.com]http://www.oscommerce.com[/url] Copyright ? 2003 osCommerce Released under the GNU General Public License */ // Define the webserver and path parameters // * DIR_FS_* = Filesystem directories (local/physical) // * DIR_WS_* = Webserver directories (virtual/URL) define('HTTP_SERVER', 'http://www.zashop.co.za'); // eg, [url=http://localhost]http://localhost[/url] - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, [url=https://localhost]https://localhost[/url] - should not be empty for productive servers define('ENABLE_SSL', 'false'); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.zashop.co.za'); 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', '/home/httpd/vhosts/zashop.co.za/httpdocs/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'are_you_trying_to_read_my_details?_THATS_CHEEKY'); define('DB_SERVER_PASSWORD', 'my_password_is_********'); define('DB_DATABASE', 'zashopdb'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Menou and unome
deathgod Posted September 27, 2006 Author Posted September 27, 2006 Some progress of a sort: i ran the following code on my webserver: <?php if (mysql_connect('localhost', 'user_****', 'pw_****')) echo 'db connected'; else echo 'not connected'; ?> and the results were 'db connected' which means that my database is working. If you want to check for yourself go to http://www.zashop.co.za/db_checker.php I have checked by entering wrong info and i get an error so the code is correct The details i have used here is the exact details i used in my configure.php files so we know that those are correct......what else could be causing the 1056 error? anyone, please help. Menou and unome
♥Vger Posted September 27, 2006 Posted September 27, 2006 Try this. Create a new text file on your desktop and rename it to cwd.php (ignore the warning about changing the file type). Put this code into it: <?php $p = getcwd(); echo $p; ?> Upload that file to the folder or level your website is located at and then go to it in your browser e.g. http://www.yourdomain.com/cwd.php and it will print out on the page what the full pathway is to your website. Don't leave it on your website - delete it after use. Vger
deathgod Posted September 27, 2006 Author Posted September 27, 2006 Thx for replying, my hero:).....the output is /home/httpd/vhosts/zashop.co.za/httpdocs which is the exactly what is written in the configure.php file :( Just a question that might help: Other than the 2 configure.php files, what files get modified upon the defualt installation? Nick Menou and unome
deathgod Posted September 27, 2006 Author Posted September 27, 2006 bump........anyone got an answer to my last question: Other than the 2 configure.php files, what files get modified upon the defualt installation? i think i'll try re-upload these files, and if that doesn't work, then i'll re-upload everything, which i hope i wont have to do :( Menou and unome
♥Monika in Germany Posted September 27, 2006 Posted September 27, 2006 Nick, have you checked for secondary configure.php files in the includes/local folders? :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
deathgod Posted September 28, 2006 Author Posted September 28, 2006 Monika, i love you @}->-- i had no local/configure.php file on my old site, but did on my new site so i deleted it and its working :D The local/configure.php file overrode the settings i put in my other configure.php files, i think. Anyway, its working now so a very big thank you, dont think i would have ever figured that one out by myself. Nick Menou and unome
♥Monika in Germany Posted September 28, 2006 Posted September 28, 2006 wonderful ... I dealt with something like that in my very first osC installation, so I learned it the hard way ;-) :-) Monika addicted to writing code ... can't get enough of databases either, LOL! my toolbox: Textpad - Compare and Merge - phpMyAdmin - WS_FTP - Photoshop - How to search the forum Interactive Media Award July 2007 ~ category E-Commerce my advice on the forum is for free, PMs where you send me work are considered consultation which I charge for ...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.