Parse error: syntax error, unexpected T_STRING in /web/osc/index.php on line 22
HI,
I've spent most of the day removing, carefully, unnecessary script from my os commerce site, but I made an error.
Can anyone tell me how can I find this error, I was in several files and I'm pretty sure it's not massive code problems.
Also, is there a debugging program. I have old C programming knowledge, but I knew I was out of my league, so I was careful, and about to turn it to a more knowledgeable programmer before this happened.
Syntax Error -String Error Correction
Page 1 of 1
6 Replies - 1986 Views - Last Post: 05 June 2009 - 11:53 AM
Replies To: Syntax Error -
#2
Re: Syntax Error -
Posted 05 June 2009 - 11:38 AM
T_STRING errors are usually when you've messed up when outputting something, especially with a lot of variables, like
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
from line 20-23.
Yours,
Shane~
echo "Hello wordl!"my mistake;
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
Yours,
Shane~
This post has been edited by ShaneK: 05 June 2009 - 11:42 AM
#3
Re: Syntax Error -
Posted 05 June 2009 - 11:41 AM
ShaneK, on 5 Jun, 2009 - 10:38 AM, said:
T_STRING errors are usually when you've messed up when outputting something, especially with a lot of variables, like [code]echo "Hello wordl!"my mistake;
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
from line 20-23.
Yours,
Shane~
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
Yours,
Shane~
Thanks, here's code.
[code]<?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', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"><b></b></td></tr><tr><td class="main" valign="top">'. tep_image(DIR_WS_IMAGES . '') .'</td><td class="main" valign="top"></a></td></tr></table></a> This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Services For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', '');
define('TABLE_HEADING_DATE_EXPECTED', '');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Select your service');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS, 'Service 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 services to list in this category.');
define('TEXT_NO_PRODUCTS2', '');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Services: ');
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', 'Service List');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
#4
Re: Syntax Error -
Posted 05 June 2009 - 11:44 AM
As stated, it was on line 22.
Should actually be:
(Also, you should add [ /code] to the end of your code in your post, because it still looks messy.)
Yours,
Shane~
define('TABLE_HEADING_PRODUCTS, 'Service Name');
Should actually be:
define('TABLE_HEADING_PRODUCTS', 'Service Name');
(Also, you should add [ /code] to the end of your code in your post, because it still looks messy.)
Yours,
Shane~
This post has been edited by ShaneK: 05 June 2009 - 11:45 AM
#5
Re: Syntax Error -
Posted 05 June 2009 - 11:45 AM
tennwebber, on 5 Jun, 2009 - 10:41 AM, said:
ShaneK, on 5 Jun, 2009 - 10:38 AM, said:
T_STRING errors are usually when you've messed up when outputting something, especially with a lot of variables, like [code]echo "Hello wordl!"my mistake;
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
from line 20-23.
Yours,
Shane~
The error tells you it's on your /web/osc/index.php page on line 22. That's where you should be looking. If you'd like us to help then please
Yours,
Shane~
Thanks, here's code.
[code]<?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', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"><b></b></td></tr><tr><td class="main" valign="top">'. tep_image(DIR_WS_IMAGES . '') .'</td><td class="main" valign="top"></a></td></tr></table></a> This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Services For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', '');
define('TABLE_HEADING_DATE_EXPECTED', '');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Select your service');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS, 'Service 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 services to list in this category.');
define('TEXT_NO_PRODUCTS2', '');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Services: ');
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', 'Service List');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
[code]tep_image(DIR_WS_IMAGES . '') .'</td><td class="main" valign="top"></a></td></tr></table></a> This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Services For %s');
#6
Re: Syntax Error -
Posted 05 June 2009 - 11:47 AM
Read the post right before your last and I've shown what you messed up on. But it looks like you fixed it in what you just showed...
Yours,
Shane~
Yours,
Shane~
This post has been edited by ShaneK: 05 June 2009 - 11:48 AM
#7
Re: Syntax Error -
Posted 05 June 2009 - 11:53 AM
[quote name='tennwebber' date='5 Jun, 2009 - 10:41 AM' post='664550']
[quote name='ShaneK' post='664547' date='5 Jun, 2009 - 10:38 AM']
T_STRING errors are usually when you've messed up when outputting something, especially with a lot of variables, like
[quote name='ShaneK' post='664547' date='5 Jun, 2009 - 10:38 AM']
T_STRING errors are usually when you've messed up when outputting something, especially with a lot of variables, like
echo "Hello wordl!"my mistake;
The error tells you it's on your [il]/web/osc/index.php[/il] page on line 22. That's where you should be looking. If you'd like us to help then please :code: from line 20-23.
Yours,
Shane~
[/quote]
Thanks, here's code.
[code]<?php
/*
$Id: index.php,v 1.1 2003/06/11 17:38:00 hpdl Exp $
osCommerce, Open Source E-Commerce Solutions
[url=http://www.oscommerce.com]http://www.oscommerce.com[/url]
Copyright © 2003 osCommerce
Released under the GNU General Public License
*/
define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"></td></tr><tr><td class="main" valign="top">' . tep_image(DIR_WS_IMAGES . '') . '</td><td class="main" valign="top"><b></b></td></tr><tr><td class="main" valign="top">'. tep_image(DIR_WS_IMAGES . '') .'</td><td class="main" valign="top"></a></td></tr></table></a> This shop is running on osCommerce version <font color="#f0000"><b>' . PROJECT_VERSION . '</b></font>.');
define('TABLE_HEADING_NEW_PRODUCTS', 'New Services For %s');
define('TABLE_HEADING_UPCOMING_PRODUCTS', '');
define('TABLE_HEADING_DATE_EXPECTED', '');
if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Select your service');
define('TABLE_HEADING_IMAGE', '');
define('TABLE_HEADING_MODEL', 'Model');
define('TABLE_HEADING_PRODUCTS, 'Service 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 services to list in this category.');
define('TEXT_NO_PRODUCTS2', '');
define('TEXT_NUMBER_OF_PRODUCTS', 'Number of Services: ');
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', 'Service List');
} elseif ($category_depth == 'nested') {
define('HEADING_TITLE', 'Categories');
}
?>
[/quote] Thanks Shane, now I'm getting line 13 error. You think I need to start over?
[code]define('TEXT_MAIN', '<br><table border="0" width="100%" cellspacing="5"
Page 1 of 1
|
|

New Topic/Question
Reply




MultiQuote




|