caff2002 Posted December 23, 2004 Posted December 23, 2004 Hi all, I have installed the shop succesful, but accesing to the catalog appears this on my browser: error_log('RESULT ' . $result . ' ' . $result_error . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } return $result; } function tep_db_perform($table, $data, $action = 'insert', $parameters = '', $link = 'db_link') { reset($data); if ($action == 'insert') { $query = 'insert into ' . $table . ' ('; while (list($columns, ) = each($data)) { $query .= $columns . ', '; } $query = substr($query, 0, -2) . ') values ('; reset($data); while (list(, $value) = each($data)) { switch ((string)$value) { case 'now()': $query .= 'now(), '; break; case 'null': $query .= 'null, '; break; default: $query .= '\'' . tep_db_input($value) . '\', '; break; } } $query = substr($query, 0, -2) . ')'; } elseif ($action == 'update') { $query = 'update ' . $table . ' set '; while (list($columns, $value) = each($data)) { switch ((string)$value) { case 'now()': $query .= $columns . ' = now(), '; break; case 'null': $query .= $columns .= ' = null, '; break; default: $query .= $columns . ' = \'' . tep_db_input($value) . '\', '; break; } } $query = substr($query, 0, -2) . ' where ' . $parameters; } return tep_db_query($query, $link); } function tep_db_fetch_array($db_query) { return mysql_fetch_array($db_query, MYSQL_ASSOC); } function tep_db_num_rows($db_query) { return mysql_num_rows($db_query); } function tep_db_data_seek($db_query, $row_number) { return mysql_data_seek($db_query, $row_number); } function tep_db_insert_id() { return mysql_insert_id(); } function tep_db_free_result($db_query) { return mysql_free_result($db_query); } function tep_db_fetch_fields($db_query) { return mysql_fetch_field($db_query); } function tep_db_output($string) { return htmlspecialchars($string); } function tep_db_input($string) { return addslashes($string); } function tep_db_prepare_input($string) { if (is_string($string)) { return trim(tep_sanitize_string(stripslashes($string))); } elseif (is_array($string)) { reset($string); while (list($key, $value) = each($string)) { $string[$key] = tep_db_prepare_input($value); } return $string; } else { return $string; } } ?> Unable to connect to database server! The admin block works OK !!!!! ANy ideas? Thanks in advance Have a merry Christmas!!!
♥Vger Posted December 23, 2004 Posted December 23, 2004 Make sure that you have the database name, user name and password in your catalog/includes/configure.php file. It looks as though you have that info in your catalog/admin/includes/configure.php file, but not in the other. Vger
caff2002 Posted December 24, 2004 Author Posted December 24, 2004 Thanks Vger It seems ok... the definitions for database are the same than in admin. If I change something, like database name, the error is the same. /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 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.xxxxxxxxx.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.xxxxxxx.com'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/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/locosnav/public_html/catalog/'); 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', 'xxxxxxxxx'); define('DB_SERVER_PASSWORD', 'xxxxxxxx'); define('DB_DATABASE', xxxxxxx'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?>
♥Vger Posted December 24, 2004 Posted December 24, 2004 There is an apostrophie missing here, or was that removed when you copied it? define('DB_DATABASE', xxxxxxx'); Vger
caff2002 Posted December 24, 2004 Author Posted December 24, 2004 HI again... I ma thinking that maybe the problem is in the htaccess filo or in my server. If I go to http://www.xxxxxxxx.com/catalog/ i get that error If I access to the index, like http://www.xxxxxxxx.com/catalog/index.php the error is: Internal Server Error The server encountered an internal error or misconfiguration and was unable to complete your request. Please contact the server administrator, webmaster and inform them of the time the error occurred, and anything you might have done that may have caused the error. More information about this error may be available in the server error log. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
♥Vger Posted December 24, 2004 Posted December 24, 2004 Was the apostrophie actually missing from your database define? Vger
caff2002 Posted December 24, 2004 Author Posted December 24, 2004 The apostrophie is ok, was missed removing the password... is not the problem. ;)
♥Vger Posted December 24, 2004 Posted December 24, 2004 If it was a server problem then it would affect your whole site. If .htaccess was the problem then it would affect 'admin' too, as it would have to be the .htaccess file in the root directory that was causing the problem. This final part of the initial error you posted shows the problem to be in trying to connect to the database "Unable to connect to database server!" I have seen this happen sometimes when FrontPage extensions are installed on a domain. If you have them installed then uninstall them, or get your hosting company to unintsall them if you don't have the access to do that - and then FTP to your site and delete all folders beginning with vti. If this is not the problem then it just may be that the database got corrupted during the install, and not all tables were set up. I have seen this happen quite often. Vger
Recommended Posts
Archived
This topic is now archived and is closed to further replies.