coast2co Posted December 23, 2005 Share Posted December 23, 2005 Parse error: parse error, unexpected ':' in /home/coast2co/public_html/osCommerce/catalog/includes/configure.php on line 20 <?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.coast2coastelec.com"); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER',"https://www.coast2coastelec.com"); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN',"http://www.coast2coastelec.com"); define('HTTPS_COOKIE_DOMAIN',https://www.coast2coastelec.com"); define('HTTP_COOKIE_PATH',http://www.coast2coastelec.com"); define('HTTPS_COOKIE_PATH',"https://www.coast2coastelec.com"); define('DIR_WS_HTTP_CATALOG',"http://www.coast2coastelec.com"); define('DIR_WS_HTTPS_CATALOG',"https://www.coast2coastelec.com"); 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',"coast2co_p_os1"); define('DB_SERVER_PASSWORD',"panama"); define('DB_DATABASE', 'osCommerce'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS',"mysql"); // leave empty '' for default handler or set to 'mysql' ?> Link to comment Share on other sites More sharing options...
AlanR Posted December 23, 2005 Share Posted December 23, 2005 define('HTTP_COOKIE_DOMAIN', 'www.coast2coastelec.com'); define('HTTPS_COOKIE_DOMAIN', 'www.coast2coastelec.com'); // <-- line 20 You missed out a " and I changed them to single quotes. 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) Link to comment Share on other sites More sharing options...
coast2co Posted December 23, 2005 Author Share Posted December 23, 2005 Alan so what your saying I need to remove the quotation marks from aentries I made and put in its place the sigle strike mark Link to comment Share on other sites More sharing options...
AlanR Posted December 23, 2005 Share Posted December 23, 2005 In general use the style of quotation mark that's already in use in the page you're editing. If you look you'll see that all the defaults you didn't change were all single quotes. Lots of times it will work either way. The single quote is php's delimiter. 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) Link to comment Share on other sites More sharing options...
coast2co Posted December 23, 2005 Author Share Posted December 23, 2005 I fixed everything now I have this error 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] Link to comment Share on other sites More sharing options...
AlanR Posted December 23, 2005 Share Posted December 23, 2005 Here's a guide I snagged through a quick Google search: Description The coding standards need to be updated with a section about strings. Constant strings should not be contained by double quotes. Here are some reasons why. 1. Performance: every string surrounded by double quotes ("a sample string") has to be parsed by php to see if it contains any special characters, or variables. There are so many of these strings in the drupal source there must be some performance penalty. 2. Code Readability: when ever a coder sees a string in double quotes he/she has to examine the string to see if there is any variable replacement, or special characters in the string. It is much easier to read code with single quoted strings. i.e. Double quotes: <?php $url = "<a href=\"filename/$somevar?opt=$someothervar\">$link_title</a>"; ?> Single quotes: <?php $url = '<a href="filename/' . $somevar . '?opt=' . $someothervar . '">' . $link_title . '</a>'; ?> With the single quoted string it is much easier to se where the variables are used, and php does not have to any extra parsing on the string. http://drupal.org/node/3561 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) Link to comment Share on other sites More sharing options...
AlanR Posted December 23, 2005 Share Posted December 23, 2005 I fixed everything now I have this error 1046 - No Database Selected select configuration_key as cfgKey, configuration_value as cfgValue from configuration [TEP STOP] You clearly didn't "fix" everything, you 'unfixed' at least one thing, check your work, especially the database name. :P 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) Link to comment Share on other sites More sharing options...
coast2co Posted December 23, 2005 Author Share Posted December 23, 2005 I got the file to work but now I'm back to the origianl problem before I modified the configure.php Now its not showing any graphics or pic just the boxes where they go and text Link to comment Share on other sites More sharing options...
AlanR Posted December 23, 2005 Share Posted December 23, 2005 I didn't check your entire file the first time, there are other mistakes. define('HTTP_COOKIE_DOMAIN', 'www.coast2coastelec.com'); define('HTTPS_COOKIE_DOMAIN', 'www.coast2coastelec.com'); define('HTTP_COOKIE_PATH', '/catalog/'); define('HTTPS_COOKIE_PATH', '/catalog/'); define('DIR_WS_HTTP_CATALOG', '/catalog/'); define('DIR_WS_HTTPS_CATALOG', '/catalog/'); Earlier today this was pretty much working, I remember. Did you decide to go in and break things or what? ;) 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) Link to comment Share on other sites More sharing options...
coast2co Posted December 23, 2005 Author Share Posted December 23, 2005 I still don't get graphics or picks this is the latest: <?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.coast2coastelec.com"); // eg, http://localhost - should not be empty for productive servers define('HTTPS_SERVER',"https://www.coast2coastelec.com"); // eg, https://localhost - should not be empty for productive servers define('ENABLE_SSL', true); // secure webserver for checkout procedure? define('HTTP_COOKIE_DOMAIN', 'www.coast2coastelec.com'); define('HTTPS_COOKIE_DOMAIN', 'www.coast2coastelec.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',"coast2co_p_os1"); define('DB_SERVER_PASSWORD',"mysecret"); define('DB_DATABASE', 'coast2co_p_os1'); define('USE_PCONNECT', 'false'); // use persistent connections? define('STORE_SESSIONS',"mysql"); // leave empty '' for default handler or set to 'mysql' ?> Link to comment Share on other sites More sharing options...
coast2co Posted December 23, 2005 Author Share Posted December 23, 2005 I fixed it.... Alan thanks for info but when you said /catalog/ we were missing part of path: /osComerce/catalog/ now it works Because my path has osCommerce as the main folder and required it first in path prior to catalog Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.