Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error help please


Guest

Recommended Posts

Hello,

 

I have a parse error on line 13. I do not know what I am looking for and would appreciate any help as to how to fix it. My cat walked across the keyboard and I have absolutely no idea if I have deleted too many wrong characters. Here is my index.php page or part thereof.

 

<?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', 'Welcome to Spicks and Specks. Unusual and custom made jewellery to set you apart from everyone else. Add your own flair to most of the pieces available. All of the jewellery featured at the moment is made from solid sterling silver and uses semi-precious gemstones. We welcome your feedback on our store so let us know what you think. We hope you enjoy shopping with Spicks and Specks. Please be aware that this store is currently undergoing some cosmetic modifications but is still fully functional. Have fun browsing and if I can be of any assistance please don't hesitate to contact me. Regards, Belinda.');

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

 

 

I tried to restore a backup but it didn't override the error, so I really don't know what I am doing and would appreciate any help.

 

Thank you.

 

B.

Link to comment
Share on other sites

In your text towards the end where it says " please don't hesitate to contact me." You need to escape "don't". So just replace it with this one.

 

don\'t

 

So just remember when your using ' in words you have to escape them or the sever will try to render it as code.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

Thank you Nick,

 

I did try this and it hasn't worked. Any other suggestions? as I didn't think that that line was line 13.

 

I appreciate your help.

 

Regards,

B.

Link to comment
Share on other sites

That should have fixed it. Everything from the first define down to Belinda is part of line 13

 

Thank you Nick,

 

I did try this and it hasn't worked. Any other suggestions? as I didn't think that that line was line 13.

 

I appreciate your help.

 

Regards,

B.

Link to comment
Share on other sites

Thank you to Mark and Roman as well for your replies.

 

Roman, could you please clarify your response. Where should the closed } be?

 

Thank you.

B.

Link to comment
Share on other sites

The logic code you posted from what I see the } needs to go after

the code line define ('TABLE_HEADING_IMAGE', ''); like this

 

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

define('HEADING_TITLE', 'Let\'s See What We Have Here');

define('TABLE_HEADING_IMAGE', '');

}

 

This means that if the if statement is true than the code between

{ } will be executed.

 

Roman

Link to comment
Share on other sites

Hi Roman,

 

I only posted a portion of my index.php file as I thought the error was contained to that first line (13).

 

I looked at the file and there is a closed } at the end of the file.

 

I'll post the file again and maybe you can see where I am going wrong.

 

<?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', 'Welcome to Spicks and Specks. Unusual and custom made jewellery to set you apart from everyone else. Add your own flair to most of the pieces available. All of the jewellery featured at the moment is made from solid sterling silver and uses semi-precious gemstones. We welcome your feedback on our store so let us know what you think. We hope you enjoy shopping with Spicks and Specks. Please be aware that this store is currently undergoing some cosmetic modifications but is still fully functional. Have fun browsing and if I can be of any assistance please don/'t hesitate to contact me. Regards, Belinda.');

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', 'Style');

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 in this style.');

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 Styles');

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

define('HEADING_TITLE', 'What\'s New Here?');

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

define('HEADING_TITLE', 'Categories');

}

?>

 

I appreciate your time.

 

Thank you,

B.

Link to comment
Share on other sites

I don't see any syntax errors...Another technique that I use to locate errors is to put /* */ around code this will comment the code...So as

you do this and the error disappears then you know that the error is

between /* */

I hope this helps

Roman

Link to comment
Share on other sites

I tried to restore a backup but it didn't override the error, so I really don't know what I am doing and would appreciate any help.

 

...maybe check the file permissions on the catalog/includes/languages/english/index.php

 

It may have somehow changed, so that you can't overwrite it now. I think your error is gone, but the file is not writable for some reason.

Link to comment
Share on other sites

forward slash used instead of backslash

don/'t

 

should be

don\'t

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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

241 Is correct and like I stated in my first post I also showed you the correct way as well. I used a forward slash not a back slash so you have to pay attention to little details like this. Just copy the one above or in my first post and paste it over the "don't" you have now

 

Forward slash can be found above the enter/return button.

 

Try that it I am sure 99% it will solve your problem.

 

Good Luck

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

And yes that is part of line 13, just because it is on lines further down is because the code that contains the error starts on Line 13. So you have to pay attention to that as well as it might not be on exactly line 13 you have to examine all the code starting on that line until the ; All php code or lines of code end with ; So if you ahve a problem and it says something like line 20 but line 20 is no problems then examine all the code from line 20 until the end ; for that line of code. Hope that makes things easier for the furture.

 

Good Luck

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

241 Is correct and like I stated in my first post I also showed you the correct way as well. I used a forward slash not a back slash so you have to pay attention to little details like this.

 

wrong way round you used a backslash not a forward slash

 

/ Forward slash (the top leans forward)

\ Back slash (the top leans backwards)

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! :P

Is your Osc dated try Phoenix  raising oscommerce from the ashes.

Link to comment
Share on other sites

That might be what yall call it in Scotland, but here in the US that is backwards.

 

If you look at my first post (2 post) I used

 

Don\'t

 

which however you want to call it that is the correct way and how I posted it.

Search the forum and contributions before posting. If that doesn't work, keep looking, then post. The forum is for seeking help and advice NOT for someone to do your work for you. Try to do something on your on, if you are going to run a shop then learn how it works.

Link to comment
Share on other sites

THANK YOU, THANK YOU, THANK YOU.

 

Nick. I apologise for my blonde moment, and appreciate you checking back on that for me.

 

Steve, Mark and Roman thank you also.

 

I wonder if each of you (and others that take the time to respond to these forum queries) realise how much help you are to others not as IT literate as yourselves.

 

Thank you again,

 

Enjoy your day,

Belinda.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...