shayrgob Posted June 27, 2004 Posted June 27, 2004 I dont know what happened, but i cant get into my admin area, it gives me this error: 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] What should i do?
♥ecartz Posted June 27, 2004 Posted June 27, 2004 That usually means that that your DB configuration settings in configure.php are wrong or that the database is empty. If the catalog is still working, copy the DB settings from there to the admin. Hth, Matt Always back up before making changes.
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 This is what i found at the bottom of admin/includes/configure.php: // define our database connection define('DB_SERVER', ''); define('DB_SERVER_USERNAME', 'mysql'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> I think thats my problem but i just want to make sure before i start doing anything. Do i just put in my info there or does it have to be exactly the same as from catalogs/includes/configure.php?
AlanR Posted June 27, 2004 Posted June 27, 2004 This is what i found at the bottom of admin/includes/configure.php: // define our database connection define('DB_SERVER', ''); define('DB_SERVER_USERNAME', 'mysql'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', ''); ?> I think thats my problem but i just want to make sure before i start doing anything. Do i just put in my info there or does it have to be exactly the same as from catalogs/includes/configure.php? Yes, it's exactly the same info as catalog/includes/configure.php, it's the same database. You can not do any harm. Local: Mac OS X 10.5.8 - Apache 2.2/php 5.3.0/MySQL 5.4.10 • Web Servers: Linux Tools: BBEdit, Coda, Versions (Subversion), Sequel Pro (db management)
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 I just put in all that info and now im getting this: Parse error: parse error in /home/nissan/public_html/catalog/admin/includes/configure.php on line 40 Warning: main(DIR_WS_INCLUDESfilenames.php): failed to open stream: No such file or directory in /home/nissan/public_html/catalog/admin/includes/application_top.php on line 44 Fatal error: main(): Failed opening required 'DIR_WS_INCLUDESfilenames.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/nissan/public_html/catalog/admin/includes/application_top.php on line 44
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 Heres what line 44 looks like right now: define('LOCAL_EXE_ZIP', '/usr/local/bin/zip'); What do i do w/ it?
♥ecartz Posted June 27, 2004 Posted June 27, 2004 Ignore line 44 of application_top.php and look at line 40 and earlier in includes/configure.php (maybe 38-40). Something is misset there. Hth, Matt Always back up before making changes.
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 I really dont know what to look for so heres lines 37-40 in the admin/includes/configure.php: define('DIR_WS_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); Please let me know what i should do. thanks
Guest Posted June 27, 2004 Posted June 27, 2004 The problem is with the line including the following as in the error message: DIR_WS_INCLUDESfilenames.php
♥ecartz Posted June 27, 2004 Posted June 27, 2004 Your lines 37-40 should only be two lines (32 and 33 in mine) in the actual file. My line 40 regards the DB_SERVER_USERNAME. Since there is a parse error in the file, the whole file fails to run. Therefore all the lines don't work, not just DIR_WS_INCLUDES. Thus the later error doesn't really give us any new info. Hth, Matt Always back up before making changes.
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 Heres the whole php file from admin/includes/configure.php I cant figure this out. So if it should be 2 lines, what should i take out of 37-40? Take a look here and tell me if theres something wrong. thanks: <?php /* $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', ''); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); <?php /* $Id: configure.php,v 1.14 2003/02/21 16:55:24 dgw_ Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2002 osCommerce Released under the GNU General Public License */ // define our webserver variables // FS = Filesystem (physical) // WS = Webserver (virtual) define('HTTP_SERVER', ''); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', ''); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', $DOCUMENT_ROOT); // where your pages are located on the server. if $DOCUMENT_ROOT doesnt suit you, replace with your local path. (eg, /usr/local/apache/htdocs) define('DIR_WS_ADMIN', '/admin/'); define('DIR_FS_ADMIN', DIR_FS_DOCUMENT_ROOT . DIR_WS_ADMIN); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', DIR_FS_DOCUMENT_ROOT . DIR_WS_CATALOG); define('DIR_WS_IMAGES', 'images/'); define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/'); define('DIR_WS_CATALOG_IMAGES', DIR_WS_CATALOG . 'images/'); 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_CATALOG_LANGUAGES', DIR_WS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_LANGUAGES', DIR_FS_CATALOG . 'includes/languages/'); define('DIR_FS_CATALOG_IMAGES', DIR_FS_CATALOG . 'images/'); define('DIR_FS_CATALOG_MODULES', DIR_FS_CATALOG . 'includes/modules/'); define('DIR_FS_BACKUP', DIR_FS_ADMIN . 'backups/'); // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'nissan_nissan'); define('DB_SERVER_PASSWORD', '*****'); define('DB_DATABASE', 'nissan_Database1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty ' ' for default handler or set to 'mysql' ?>
shayrgob Posted June 27, 2004 Author Posted June 27, 2004 Thanks for the help everyone. I got into the admin area b/c i just took another look at that code i just posted and it was pretty evident why it wasnt working.
Recommended Posts
Archived
This topic is now archived and is closed to further replies.