Guest Posted December 27, 2004 Posted December 27, 2004 Hello, I tried downloading my shopping cart to the root directory but I cant get it to work. But when I downloaded it into one of the directory within the root directory, such as /shopping, everything works. I want it to be charmsoutlet.com NOT charmsoutlet.com/shopping. How can I resolve this problem? Thank you
boxtel Posted December 27, 2004 Posted December 27, 2004 Hello,I tried downloading my shopping cart to the root directory but I cant get it to work. But when I downloaded it into one of the directory within the root directory, such as /shopping, everything works. I want it to be charmsoutlet.com NOT charmsoutlet.com/shopping. How can I resolve this problem? Thank you <{POST_SNAPBACK}> changed your configure.php files accordingly ? Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 What do you mean by that? changed your configure.php files accordingly ? <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 What do you mean by that? <{POST_SNAPBACK}> settings like these so osc knows where your catalog is located : define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 Hello, No I have not touched those. How can I make the changes to bellow files? Thanks settings like these so osc knows where your catalog is located : define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', '/'); define('DIR_WS_HTTPS_CATALOG', '/'); <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 Hello,No I have not touched those. How can I make the changes to bellow files? Thanks <{POST_SNAPBACK}> well, you go into includes/configure.php and edit them. by default they are set to something like : define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', 'catalog/'); define('DIR_WS_HTTPS_CATALOG', 'catalog/'); but if you move your store up/out of the catalog subdirectory, you have to tell osc so. Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 what would i changed it to to be able to set it to the main url, such as charmsoutlet.com well, you go into includes/configure.php and edit them. by default they are set to something like : define('HTTP_COOKIE_PATH', '/'); define('HTTPS_COOKIE_PATH', '/'); define('DIR_WS_HTTP_CATALOG', 'catalog/'); define('DIR_WS_HTTPS_CATALOG', 'catalog/'); but if you move your store up/out of the catalog subdirectory, you have to tell osc so. <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 what would i changed it to to be able to set it to the main url, such as charmsoutlet.com <{POST_SNAPBACK}> what is it saying now ? Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 Here is my configure.php, this is what it is saying: <?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com 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://192.168.0.25'); // 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', '192.168.0.25'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/61beta/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/61beta/'); 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/'); //Added for BTS1.0 define('DIR_WS_TEMPLATES', 'templates/'); define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/'); define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/'); //End BTS1.0 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', 'c:/appserv/www/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', '192.168.0.25'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', '61loaded'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> what is it saying now ? <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 Here is my configure.php, this is what it is saying:<?php /* osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com 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://192.168.0.25'); // 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', '192.168.0.25'); define('HTTPS_COOKIE_DOMAIN', ''); define('HTTP_COOKIE_PATH', '/61beta/'); define('HTTPS_COOKIE_PATH', ''); define('DIR_WS_HTTP_CATALOG', '/61beta/'); 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/'); //Added for BTS1.0 define('DIR_WS_TEMPLATES', 'templates/'); define('DIR_WS_CONTENT', DIR_WS_TEMPLATES . 'content/'); define('DIR_WS_JAVASCRIPT', DIR_WS_INCLUDES . 'javascript/'); //End BTS1.0 define('DIR_WS_DOWNLOAD_PUBLIC', 'pub/'); define('DIR_FS_CATALOG', 'c:/appserv/www/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); // define our database connection define('DB_SERVER', '192.168.0.25'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'root'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', '61loaded'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> <{POST_SNAPBACK}> in what directory is your index.php now ? Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 Its in the www directory and the loaded61a in what directory is your index.php now ? <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 Its in the www directory and the loaded61a <{POST_SNAPBACK}> well, in both is a little strange but if your main index.php (the one that will display your main page) is in www and that is your servers root directory then set define('DIR_WS_HTTP_CATALOG', '/61beta/'); to define('DIR_WS_HTTP_CATALOG', '/'); and define('HTTP_COOKIE_PATH', '/61beta/'); to define('HTTP_COOKIE_PATH', '/'); Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 After changing my configure file, I am typing in clinic316.com It doesn't do anything. Why is that? well, in both is a little strange but if your main index.php (the one that will display your main page) is in www and that is your servers root directory then set define('DIR_WS_HTTP_CATALOG', '/61beta/'); to define('DIR_WS_HTTP_CATALOG', '/'); and define('HTTP_COOKIE_PATH', '/61beta/'); to define('HTTP_COOKIE_PATH', '/'); <{POST_SNAPBACK}>
Guest Posted December 27, 2004 Posted December 27, 2004 It gives me the following reeor message: Warning: mysql_connect(): Can't connect to MySQL server on '192.168.0.25' (110) in /home/clinic31/public_html/includes/functions/database.php on line 19 Unable to connect to database server!
boxtel Posted December 27, 2004 Posted December 27, 2004 After changing my configure file, I am typing in clinic316.com It doesn't do anything. Why is that? <{POST_SNAPBACK}> your configure.php says your server is define('HTTP_SERVER', 'http://192.168.0.25'); not clinic316.com Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 should i change it to clinic316.com your configure.php says your server is define('HTTP_SERVER', 'http://192.168.0.25'); not clinic316.com <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 should i change it to clinic316.com <{POST_SNAPBACK}> yes, if that domain name exists and points to your server then you would set it to that name. Also the cookie domain by the way. and try setting your db server to localhost. Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 Now gives the following error: Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/clinic31/public_html/includes/functions/database.php on line 19 Unable to connect to database server! what can i do to fix this? yes, if that domain name exists and points to your server then you would set it to that name. Also the cookie domain by the way. and try setting your db server to localhost. <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 Now gives the following error:Warning: mysql_connect(): Access denied for user: 'root@localhost' (Using password: NO) in /home/clinic31/public_html/includes/functions/database.php on line 19 Unable to connect to database server! what can i do to fix this? <{POST_SNAPBACK}> well, what is your mysql database server ? Treasurer MFC
boxtel Posted December 27, 2004 Posted December 27, 2004 well, what is your mysql database server ? <{POST_SNAPBACK}> if it is localhost then you have to supply the password for root if you have set that. Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 DBI:mysql:clinic31_shopping:localhost","and the user is: clinic31_admin well, what is your mysql database server ? <{POST_SNAPBACK}>
Guest Posted December 27, 2004 Posted December 27, 2004 Yes I have setup the password and the database Here is what my database.php looks like: <?php /* $Id: database.php,v 1.1.1.1 2004/03/04 23:40:48 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright © 2003 osCommerce Released under the GNU General Public License */ function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } function tep_db_error($query, $errno, $error) { die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>'); } function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); 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; } } ?> if it is localhost then you have to supply the password for root if you have set that. <{POST_SNAPBACK}>
Guest Posted December 27, 2004 Posted December 27, 2004 Where can I insert my database password? Yes I have setup the password and the databaseHere is what my database.php looks like: <?php /* $Id: database.php,v 1.1.1.1 2004/03/04 23:40:48 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } function tep_db_error($query, $errno, $error) { die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>'); } function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); 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; } } ?> <{POST_SNAPBACK}>
boxtel Posted December 27, 2004 Posted December 27, 2004 Yes I have setup the password and the databaseHere is what my database.php looks like: <?php /* $Id: database.php,v 1.1.1.1 2004/03/04 23:40:48 ccwjr Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright ? 2003 osCommerce Released under the GNU General Public License */ function tep_db_connect($server = DB_SERVER, $username = DB_SERVER_USERNAME, $password = DB_SERVER_PASSWORD, $database = DB_DATABASE, $link = 'db_link') { global $$link; if (USE_PCONNECT == 'true') { $$link = mysql_pconnect($server, $username, $password); } else { $$link = mysql_connect($server, $username, $password); } if ($$link) mysql_select_db($database); return $$link; } function tep_db_close($link = 'db_link') { global $$link; return mysql_close($$link); } function tep_db_error($query, $errno, $error) { die('<font color="#000000"><b>' . $errno . ' - ' . $error . '<br><br>' . $query . '<br><br><small><font color="#ff0000">[TEP STOP]</font></small><br><br></b></font>'); } function tep_db_query($query, $link = 'db_link') { global $$link; if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { error_log('QUERY ' . $query . "\n", 3, STORE_PAGE_PARSE_TIME_LOG); } $result = mysql_query($query, $$link) or tep_db_error($query, mysql_errno(), mysql_error()); if (defined('STORE_DB_TRANSACTIONS') && (STORE_DB_TRANSACTIONS == 'true')) { $result_error = mysql_error(); 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; } } ?> <{POST_SNAPBACK}> database.php just contains the database functions, nothing else. you set your database access in configure.php so try to set it like this : // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'clinic31_admin'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', '61loaded'); and if that username has a password you also need to set that in there Treasurer MFC
Guest Posted December 27, 2004 Posted December 27, 2004 It gives me the following message: Warning: mysql_connect(): Access denied for user: 'clinic31_admin@localhost' (Using password: YES) in /home/clinic31/public_html/includes/functions/database.php on line 19 Unable to connect to database server! Is there anything we can do to fix this? database.php just contains the database functions, nothing else. you set your database access in configure.php so try to set it like this : // define our database connection define('DB_SERVER', 'localhost'); // eg, localhost - should not be empty for productive servers define('DB_SERVER_USERNAME', 'clinic31_admin'); define('DB_SERVER_PASSWORD', ''); define('DB_DATABASE', '61loaded'); and if that username has a password you also need to set that in there <{POST_SNAPBACK}>
Recommended Posts
Archived
This topic is now archived and is closed to further replies.