BenFremer Posted October 16, 2005 Posted October 16, 2005 I am now receiving an error from a site that I put together: Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/html/td/tdiproducts.net/includes/languages/english/index.php on line 33 I was having a similar error with the same file on another OSCommerce site I am putting together. I copied the above referenced file to the page, and now the working site is also broken. What is the error, and how do I fix it? Here is the code for the page: <?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 © 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'We are happy to welcome you to TD Innovative products. Feel free to do your shopping for home or office accessories.<br> <img src="images/tdihomeblend1.jpg" '); 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', 'Our Products:'); 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', 'Welcome to TD Innovative'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> Thanks, Ben
AlanR Posted October 16, 2005 Posted October 16, 2005 Lines 32 & 33, you're missing the escape slashes. define('TEXT_BUY', 'Buy 1 \''); define('TEXT_NOW', '\' now'); What are you editing with? You can't use the file manager as an editor. 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)
Guest Posted October 16, 2005 Posted October 16, 2005 or define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); to define('TEXT_BUY', 'Buy 1 '); define('TEXT_NOW', ' now');
BenFremer Posted October 16, 2005 Author Posted October 16, 2005 or define('TEXT_BUY', 'Buy 1 ''); define('TEXT_NOW', '' now'); to define('TEXT_BUY', 'Buy 1 '); define('TEXT_NOW', ' now'); Thank you both and thank you John. I put the text to John's recommendation, using the file manager, and now it is just loading a purely blank page. Do you have any recommendations? ( www.tdiproducts.net ) The code is now: <?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 ? 2003 osCommerce Released under the GNU General Public License */ define('TEXT_MAIN', 'We are happy to welcome you to TD Innovative products. Feel free to do your shopping for home or office accessories.<br> <img src="images/tdihomeblend1.jpg"> '); 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', 'Our Products:'); 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', 'Welcome to TD Innovative'); } elseif ($category_depth == 'nested') { define('HEADING_TITLE', 'Categories'); } ?> This could be sizable trouble if I can't get this fixed soon. :-/ Thanks, Ben
Wendy James Posted October 16, 2005 Posted October 16, 2005 Suggestion #1 Do not use the file manager to edit pages... ever. Suggestion #2 Upload the original file, or a backup if you have one via FTP. If you don't have one you can get it from the download link at the top of the page. Wendy James Creativity is allowing yourself to make mistakes. Art is knowing which ones to keep.
BenFremer Posted October 16, 2005 Author Posted October 16, 2005 Suggestion #1 Do not use the file manager to edit pages... ever.Suggestion #2 Upload the original file, or a backup if you have one via FTP. If you don't have one you can get it from the download link at the top of the page. Thank you. I uploaded the standard file from the OSCommerce download via FTP, and it is still just going to a white screen. :'(
BenFremer Posted October 16, 2005 Author Posted October 16, 2005 Uh oh. I can't even get the original error now. What does file manager do to your files? Am I going to have to rebuild this from scratch? Hopefully I was so cheap that he won't sue me.
BenFremer Posted October 16, 2005 Author Posted October 16, 2005 HALLELUJAH! It's fixed. Thank you guys!
Recommended Posts
Archived
This topic is now archived and is closed to further replies.