Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

unexpected T_STRING


TaylorMadeScrap

Recommended Posts

I was trying to change the What's new here and what do we have here and I am getting an error.....can't figure it out. Here is the error message and below it is what the code looks like:

 

Parse error: parse error, unexpected T_STRING in /var/www/html/oscommerce/includes/languages/english/index.php on line 15

 

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {

define('HEADING_TITLE', 'SCRAP 4 LIFE');

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', 'Scrap 4 Life');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', 'Categories');

 

Thanks for your help! :'(

Link to comment
Share on other sites

I changed the now and here is another copy so you can see what it looks like 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','<b>Welcome to the Scrap 4 Life Store!</b><p>

<a img scr="http://www.scrap4life.com"/a>

<p>Where great customer service is our first priority and our goal is to provide you with quality scrapbook supplies at affordable prices. We offer a diverse line of scrapbook supplies including a wide variety of embellishments, albums, Bazzill cardstock, rub-ons, patterned paper, and idea books. Whether you are new to scrapbooking or a seasoned scrapper, we can help make your scrapbook pages beautiful. In addition to our large selection of scrapbook supplies, our forums are an excellent source of inspiration for your scrapbook layout ideas.<p>If you are an avid scrapper you know how many scrapbooking supplies are available on the market right now. We do our best to keep up with the latest supplies on the market, as well as, basic essentials like paper and adhesives.<p>We offer products from a variety of vendors and designers including Bazzill Cardstock, Junkitz, Lil' Davis, 7Gypsies, and many more....');

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', 'Scrap 4 Life');

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', 'Scrap 4 Life');

} elseif ($category_depth == 'nested') {

define('HEADING_TITLE', $categories['categories_name']);

}

?>

 

Thanks!

Link to comment
Share on other sites

Thanks for the help, however, I changed the Lil Davis and now I am getting this error message.....and I didnt touch anything else.....

 

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/html/oscommerce/index.php on line 35

 

 

Im not sure what that means?....

Link to comment
Share on other sites

Hi,

 

Please do NOT use the text editor within the osCommerce Admin.

Instead, use an FTP program to copy files from the server to your PC and vice versa. Use an editor like UltraEdit to change the text in your php files.

 

UltraEdit is also useful to search for text strings in all files in a directory and its subdirectories. For example, if you would like to change Products into Articles, UltraEdit will show you all files where the word Products appears.

 

Regards,

Edze

Link to comment
Share on other sites

Hi I hope that you can help me please!!!

Ok, I was trying to change the whats new here and the lets see what we have here....I was following these directions http://www.oscommerce.com/forums/index.php?showtopic=120833

 

AAnd then I did it and it gave me the error as you can see in my first post on this thread....

Anyways, I went in to fix it, because I am getting an error message that says:

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /var/www/html/oscommerce/index.php on line 35

 

When I go in to see the text, I keep seeing the Lil' Davis without the \

I go in and fix it and make it like so, Lil\' Davis and I save it and I keep getting an error message....when I go in again to see what wrong, the \has disappeared....

 

Please help! I hope that its something easy to fix and Im just too tired to find it. Any help would be GREATLY appreciated....Thanks!!!!!!!!!!!

Link to comment
Share on other sites

As Edze said, don't use the text editor in the admin section. This is the cause of your problem - it WILL strip the backslashes out, and you'll continue to get errors.

 

Use a text editor to edit the file (even Notepad will do!) and then upload the file using FTP.

Link to comment
Share on other sites

Thanks again. I did go through my ftp client and everything seems like it is right, all the \ are there and nothing looks wrong to me.....and the error message is still there. Anyone know exactly what that error message means or any other advice what to do now to make it go away. Thanks again for all your help.

Link to comment
Share on other sites

The last time you posted your "corrected" file above, there was still an error in how one of the defines was written:

define('TEXT_BUY', 'Buy 1 '');

should read

define('TEXT_BUY', 'Buy 1 ');

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Here's how it looks up to this point:

 

 

<?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','<b>Welcome to the Scrap 4 Life Store!</b><p>

<a img scr="http://www.scrap4life.com"/a>

<p>Where great customer service is our first priority and our goal is to provide you with quality scrapbook supplies at affordable prices. We offer a diverse line of scrapbook supplies including a wide variety of embellishments, albums, Bazzill cardstock, rub-ons, patterned paper, and idea books. Whether you are new to scrapbooking or a seasoned scrapper, we can help make your scrapbook pages beautiful. In addition to our large selection of scrapbook supplies, our forums are an excellent source of inspiration for your scrapbook layout ideas.<p>If you are an avid scrapper you know how many scrapbooking supplies are available on the market right now. We do our best to keep up with the latest supplies on the market, as well as, basic essentials like paper and adhesives.<p>We offer products from a variety of vendors and designers including Bazzill Cardstock, Junkitz, Lil\' Davis, 7Gypsies, and many more....');

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['categories_name']);

}

?>

Link to comment
Share on other sites

Sounds to me like the file isn't being overwritten if you're certain that you're saving and uploading the corrected version.

 

Try this:

Delete the offending line from your file, save and upload. Then see if it's still there when you check the uploaded file. If it is, for some reason the file is not being overwritten.

 

If that's the case, you could try deleting the entire file from your server and then re-upload the corrected file.

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

Have you previously successfully uploaded any files via FTP (not via the osC file manager)?

 

If not, you may have a problem with file ownership (user nobody versus user yourname) which may be something that your web host needs to correct for you.

 

If you have a control panel for your webspace (such as cPanel), you might take a look there to see if the file exists and if you can save it via the control panel file manager

... if you want to REALLY see something that doesn't set up right out of the box without some tweaking,

try being a Foster Parent!

Link to comment
Share on other sites

I changed it and uploaded through FTP and it keeps going back to that wrong way when I go back and check it....I do it over and over and still won't change.....ANy other things I could do?  thanks so much!

 

 

I've seen this happen on some servers and it is due to file permissions - rename or delete the old file before you upload the new :P

 

Matti

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...