kevu Posted March 9, 2007 Posted March 9, 2007 Hello, I am not too familier with oscommerce and I tried to do the configuration of 2 php files after a sucessfull installation. But little confusion on some folderes path etc. Please see the following 2 files and can someone let me know which part may be wrong. I am confused as different user's instructions are not the same. Also, what permission do I need to have it on the two PHP files (744,755 or 777)? I am on a LINUX server. Also, do I have extra or missing '/' in any of the paths? My directory where all the files are > httpdocs/catalog/ 1. The following is what I have in my Admin/includes.php<?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', 'http://www.nadanspices.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.nadanspices.com'); define('HTTPS_CATALOG_SERVER', 'https://www.nadanspices.com'); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', /httpdocs/); // 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', '/httpdocs/catalog/admin/'); define('DIR_FS_ADMIN', '/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/httpdocs/catalog/'); define('DIR_FS_CATALOG', '/httpdocs/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'); define('DB_SERVER_USERNAME', '******'); define('DB_SERVER_PASSWORD', '******'); define('DB_DATABASE', 'mydbname'); define('USE_PCONNECT', 'false'); define('STORE_SESSIONS', 'mysql'); ?> 2. includes/configure.php <?php /* $Id: configure.php,v 1.14 2003/07/09 01:15:48 hpdl Exp $ 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://www.nadanspices.com'); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER', 'https://www.nadanspices.com'); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', false); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.nadanspices.com'); define('HTTPS_COOKIE_DOMAIN', 'www.nadanspices.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', 'catalog/'); define('DIR_WS_HTTPS_CATALOG', '/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', dirname($HTTP_SERVER_VARS['SCRIPT_FILENAME']) . '/'); 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', '('*****'); define('DB_SERVER_PASSWORD', '*****'); define('DB_DATABASE', 'mydbname'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS', 'mysql'); // leave empty '' for default handler or set to 'mysql' ?> Question: Once this setup done correctly, what URL I go to setup mystore configuration etc.? YOur help is greatly appreciated. Thanks!
usernamenone Posted March 10, 2007 Posted March 10, 2007 First thing I noticed is remove the https:// for the ssl as you don't have one leave it blank Do you have any errors? you then go to localhost/catalog/admin
kevu Posted March 10, 2007 Author Posted March 10, 2007 First thing I noticed is remove the https:// for the ssl as you don't have one leave it blank Do you have any errors? you then go to localhost/catalog/admin Thanks for your quick response. . Globat.com commandconsole Current Directory(pathway):root/httpdocs/ where the /httpdocs/ contains all my html and index files (including my homepage) for my current website so as the catalog folder for oscommerce. The SSL shared part is HTTPSDOCS. Anyhow, I have made the changes in the 2 php files according to that and now I am getting the "no database selected error" again! though I have my database connection defined in the 2 PHP files. Following are the two links I used then got the DB error. > http://www.nadanspices.com/catalog/admin/ http://www.nadanspices.com/catalog/ 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] So If the Globat.com commandconsole Current Directory(pathway):root/httpdocs/, is the following setup correct? The following are the current includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.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.nadanspices.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', ''); admin/includes/configure.php file define('HTTP_SERVER', 'http://www.nadanspices.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.nadanspices.com/catalog'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/httpdocs/catalog/'); // 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', '/catalog/admin/'); define('DIR_FS_ADMIN', '/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/httpdocs/catalog/'); and off course, the Database connection part with user id, pw etc. at the bottom of the 2 php files. Your help is greatly appreciated. I am totally lost. Thanks again. Thomas!
♥Vger Posted March 10, 2007 Posted March 10, 2007 It is against forum rules to double post, and your original question was being dealt with here: http://www.oscommerce.com/forums/index.php?showtopic=253978 Two things you can try. 1. To find out if /httpdocs/ is your correct root do this. Create a new text document on your Desktop and rename it to cwd.php and put this code in it: <?php $p = getcwd(); echo $p; ?> Then upload the file to your 'catalog' folder and go to it in your browser e.g. http://www.yourdomain.com/catalog/cwd.php - and you'll see the full pathway printed out on the screen. Make a note of it and then delete the file. 2. Look in the two includes/local/ folders and see if there are any alternative configure.php files in them. If you find any then rename or delete them. As you have an httpdocs folder it's almost certain that to use Globats shared ssl then all folders/files will also need to be loaded up into an httpsdocs folder (unless the two are linked to each other). Vger
kevu Posted March 10, 2007 Author Posted March 10, 2007 It is against forum rules to double post, and your original question was being dealt with here:http://www.oscommerce.com/forums/index.php?showtopic=253978 Two things you can try. 1. To find out if /httpdocs/ is your correct root do this. Create a new text document on your Desktop and rename it to cwd.php and put this code in it: <?php $p = getcwd(); echo $p; ?> Then upload the file to your 'catalog' folder and go to it in your browser e.g. http://www.yourdomain.com/catalog/cwd.php - and you'll see the full pathway printed out on the screen. Make a note of it and then delete the file. 2. Look in the two includes/local/ folders and see if there are any alternative configure.php files in them. If you find any then rename or delete them. As you have an httpdocs folder it's almost certain that to use Globats shared ssl then all folders/files will also need to be loaded up into an httpsdocs folder (unless the two are linked to each other). Vger Hello Vger Sorry for the two posting at the same time. I will not post the same again. The path I found from the CWD.PHP file is > /usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog So is this going to be my ('DIR_FS_CATALOG', ' ? '); As you mentioned about the HTTPSDOCS, do I need to move the CATALOG folder to this folder then change the 2 configure.php files ? OR continue with the HTTPDOCS and see if evertyhing works fine then move CATALOG to httpsdocs folder? I also found a same configure.php file and delted it. Please let me know when you get a chance so I can proceed. Thanks for your help.
kevu Posted March 11, 2007 Author Posted March 11, 2007 Hello VgerSorry for the two posting at the same time. I will not post the same again. The path I found from the CWD.PHP file is > /usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog So is this going to be my ('DIR_FS_CATALOG', ' ? '); As you mentioned about the HTTPSDOCS, do I need to move the CATALOG folder to this folder then change the 2 configure.php files ? OR continue with the HTTPDOCS and see if evertyhing works fine then move CATALOG to httpsdocs folder? I also found a same configure.php file and delted it. Please let me know when you get a chance so I can proceed. Thanks for your help. The following is what I have in my 2 php folders: admin/includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.nadanspices.com'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs'); // 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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog'); includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.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.nadanspices.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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/');
♥Vger Posted March 11, 2007 Posted March 11, 2007 admin/includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.nadanspices.com'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/'); // 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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/'); includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.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.nadanspices.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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Vger
kevu Posted March 12, 2007 Author Posted March 12, 2007 admin/includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.com'); // eg, http://localhost or - https://localhost should not be NULL for productive servers define('HTTP_CATALOG_SERVER', 'http://www.nadanspices.com'); define('HTTPS_CATALOG_SERVER', ''); define('ENABLE_SSL_CATALOG', 'false'); // secure webserver for catalog module define('DIR_FS_DOCUMENT_ROOT', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/'); // 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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/admin/'); define('DIR_WS_CATALOG', '/catalog/'); define('DIR_FS_CATALOG', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/'); includes/configure.php define('HTTP_SERVER', 'http://www.nadanspices.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.nadanspices.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', '/usr/local/psa/home/vhosts/nadanspices.com/httpdocs/catalog/'); define('DIR_FS_DOWNLOAD', DIR_FS_CATALOG . 'download/'); define('DIR_FS_DOWNLOAD_PUBLIC', DIR_FS_CATALOG . 'pub/'); Vger Hello Vger, After the changes have been made, it did work. Thanks for your help and patients. Now I can see the OSCommerce contol pannel page (main page) thru the following link http://www.nadanspices.com/catalog/admin/. However, If click on any links like "configuration", "My store" etc, "the page cannot be diplayed" comes up. It looks like it is looking for the Configuration.php file in the Admin folder (see the following link that displays the "page cannont find error") http://www.nadanspices.com/admin/configuration.php?selected_box=configuration&gID=1&osCAdminID=208317cc4c28b74b83f49894db938cae Any thoughts? Should I check the configuration.php file? Thanks!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.