barbarshop Posted March 2, 2004 Share Posted March 2, 2004 I have the following error and I need some help fixing it. I'm new to php and I've searched the support site for basic help on this but I have not found it. Here's my error. Parse error: parse error in /home/virginia/public_html/store/includes/languages/english/index.php on line 19 Where is line 19? That's my first problem. Second, how do I fix it and add my own text to the page? This problem occurs in the root page, virginianutshop.com/store/, and presumably any other pages that calls /home/virginia/public_html/store/includes/languages/english/index.php. Here's the code as it stands now with the error. <?php /* $Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $ osCommerce, Open Source E-Commerce Solutions http://www.oscommerce.com Copyright (c) 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', ''); define('TABLE_HEADING_NEW_PRODUCTS', 'New Products For %s'); define('TABLE_HEADING_UPCOMING_PRODUCTS', 'Upcoming Products'); define('TABLE_HEADING_DATE_EXPECTED', 'Date Expected'); if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) { define('HEADING_TITLE', 'Let's See What We Have Here'); define('TABLE_HEADING_IMAGE', ''); define('TABLE_HEADING_MODEL', 'Model'); define('TABLE_HEADING_PRODUCTS', 'Product Name'); define('TABLE_HEADING_MANUFACTURER', 'Manufacturer'); define('TABLE_HEADING_QUANTITY', 'Quantity'); define('TABLE_HEADING_PRICE', 'Price'); define('TABLE_HEADING_WEIGHT', 'Weight'); define('TABLE_HEADING_BUY_NOW', 'Buy Now'); define('TEXT_NO_PRODUCTS', 'There are no products to list in this category.'); define('TEXT_NO_PRODUCTS2', 'There is no product available from this manufacturer.'); define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Products: '); define('TEXT_SHOW', '<b>Show:</b>'); define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); define('TEXT_ALL_CATEGORIES', 'All Categories'); define('TEXT_ALL_MANUFACTURERS', 'All Manufacturers'); } elseif ($category_depth == 'top') { define('HEADING_TITLE', 'What's New Here?'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> Thank you for your help! Link to comment Share on other sites More sharing options...
The Fish Posted March 2, 2004 Share Posted March 2, 2004 This is your 19th line: define('HEADING_TITLE', 'Let's See What We Have Here'); I think the 2nd ' (Let's) is the problem, becouse the browser will recognize it as the end of your HEADING_TITLE, while it is not. Link to comment Share on other sites More sharing options...
AndrewC Posted March 2, 2004 Share Posted March 2, 2004 Using a text editor or dreamweaver, you can see line numbered on the left. Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2004 Share Posted March 2, 2004 you need to have a '\' in front of the 's' in Let's, ie Let\'s is the proper syntax. Get your self a free php editor, search for phpedit it will help you. i use dreamweaver however it is not free. Link to comment Share on other sites More sharing options...
241 Posted March 2, 2004 Share Posted March 2, 2004 same thing here define('HEADING_TITLE', 'What's New Here?'); should be define('HEADING_TITLE', 'What\'s New Here?'); I would guess that you are editing online using the file manager which is known to cause issues by removing backslashes from the code which gives the parse error The fix is to not use the online file manager to edit files but use an ftp program such as ws_ftp to download the file and edit offline then upload No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
barbarshop Posted March 2, 2004 Author Share Posted March 2, 2004 Thank you all for your help! It is now fixed and I've learned a little bit more about php in process. I really appreciate all of your help. I'm using a simple text editor. I will start ftp'ing the files instead of using the file manager. Also thanks for the "Let\'s" trick. I thought perhaps that might be the trouble but I wasn't sure. B) Link to comment Share on other sites More sharing options...
Guest Posted March 2, 2004 Share Posted March 2, 2004 Download Crimson Editor, it's free and easy to handle. Link to comment Share on other sites More sharing options...
barbarshop Posted March 4, 2004 Author Share Posted March 4, 2004 Thank you. I will download Crimson Editor and evaluate it. I've also downloaded winsyntax and I like it as well. Again thank you all. Until next time... Jeremy Link to comment Share on other sites More sharing options...
241 Posted March 4, 2004 Share Posted March 4, 2004 define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); should be define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); No longer giving free advice. Please place deposit in meter slot provided. Individual: [=] SME: [==] Corporation: [===] If deposit does not fit one of the slots provided then you are asking too much! Is your Osc dated try Phoenix raising oscommerce from the ashes. Link to comment Share on other sites More sharing options...
Guest Posted March 4, 2004 Share Posted March 4, 2004 Mibble - I use dreamweaver myself for all my other non-PHP stuff. When you use dreamweaver for PHP are you able to us it grafically or just raw code? For PHP I use PHPEdit and dreamweaver for everything else. I am a graphical learner by nature :( I have also thought of using either STS or BTS from the contributions, but I just have NO clue what the features of either one and which contribution is the best. Any ideas anyone? Yes, I did search for some of the answers without much luck :( Thanx all. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.