Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Error Now what i done wrong?


Guest

Recommended Posts

Posted

I am trying to make the front page but i keeping getting this error all the time what i done wrong?

 

Parse error: parse error in /home/jestersm/public_html/test/includes/languages/english/index.php on line 13

 

 

Please Help!

James!

Posted

You have probably made some mistake in your edits. Take a look at line 13 in includes/languages/english/index.php. What do you see there? A parse error means php couldn't understand the code. So you may have left off a ), } or some other symbol. Post it here if you can't figure it out and I'll see if I notice anything obvious.

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

Yeah I have the same issue. Im a new to this. I edited english/index.php. just removed some of the TEXT_MAIN string. No edits where made to code... only string data. I get the same error as this guy. So I copy the original english index.php back to apache. Works as default. Im lost. please help.

 

-mark

"Chooca ma blah blah"

Posted
Yeah I have the same issue. Im a new to this. I edited english/index.php. just removed some of the TEXT_MAIN string. No edits where made to code... only string data. I get the same error as this guy. So I copy the original english index.php back to apache. Works as default. Im lost. please help.

 

-mark

Post your english/index.php file (the one that fails).

 

Jack

Support Links:

For Hire: Contact me for anything you need help with for your shop: upgrading, hosting, repairs, code written, etc.

All of My Addons

Get the latest versions of my addons

Recommended SEO Addons

Posted

<?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

*/

 

('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . <b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premsis in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. '</b></font>.

 

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

define('Jesters Magic', 'Let's See What's New);

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

}

?>

Posted

Jimz

 

you have edited the file online using the file manager, there is a known issue with the file manager removing \ backslashes from the code which will cause the parse error

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.

Posted

Jimz

 

you have edited the file online using the file manager, there is a known issue with the file manager removing \ backslashes from the code which will cause the parse error.

 

It is most likely that you have not escaped an apostrophe such as let's or what's with a backslash thus let\'s or what\'s and therefore the apostrophe is being read as part of the code resulting in a parse error.

 

here is one example

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

should be

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

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.

Posted

or upload a fresh pre edited copy of the file

 

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 remember to escape any apostrophes such as let's or what's with a \ backslash thus let\'s or what\'s

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.

Posted

you could try this

<?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
*/

('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top">' . <b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premises in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. </b></font>');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('Jesters Magic', 'Let\'s See What's New);
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');
}
?>

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.

Posted

Tried that but still can't seem to get it to work is there anywhere i can download a new index.php file for that part of the site?

Posted

still doesn't work :s

 

the url is www.jestersmagic.co.uk/test

Posted

I had done a fast edit and then noticed that you had missed out the closing ); for the text part so you would have still had a parse error on line 13 I have re edited the code it should work 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! :P

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

Posted

Tried to re-upload but still line 13 error sorry about this :unsure:

Posted

found another issue with a full stop being spaced this is interpreted as code

 

this should work

 

<?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
*/

('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"><b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premises in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. </b></font>');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What\'s New);
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');
}
?>

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.

Posted

found another issue with a full stop being spaced this is interpreted as code

 

also this will not work

define('Jesters Magic', 'Let\'s See What's New);

unless you change the pages calling for the heading title

 

this should work unless I find more changes to the 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
*/

('TEXT_MAIN', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"><b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premises in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. </b></font>');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What\'s New);
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');
}
?>

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.

Posted

YES guess what spot the deliberate mistake "define"

 

<?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', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"><b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premises in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. </b></font>');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What\'s New);
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');
}
?>

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.

Posted

Now we got a error on line 17 we are getting there :D

Posted

Can't seem to find any errors on line 17 myself :blink: any ideas?

Posted

Yes a missing ' at the end of line 16 causing the break to be on line 17

 

<?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', 'This is a default setup of the osCommerce project, products shown are for demonstrational purposes, <b>any products purchased will not be delivered nor will the customer be billed</b>. Any information seen on these products is to be treated as fictional.<br><br><table border="0" width="100%" cellspacing="5" cellpadding="2"><tr><td class="main" valign="top"><b>Welcome</b><br><br>Welcome to Jesters Magic Brand Spanking new magic website here we have all most the products we have instore. So why not sit back browse and see what we have instock!<br><br><b>We Have Moved</b><br><br>To Go with the new website we have just moved to our bigger and better premises in Lincoln we have got out of the grotty old mall. We are now on the High Street opposite KFC in Lincoln!. </b></font>');

if ( ($category_depth == 'products') || (isset($HTTP_GET_VARS['manufacturers_id'])) ) {
define('HEADING_TITLE', 'Let\'s See What\'s New');
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');
}
?>

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.

Posted

WOOHOO it works thanks alot for all your help i really appreciate it!

 

Thanks alot

James

Posted

Thanks! I had to get some work done a the brew store, but i followed the conversation. I used notepad. edited it and say alkl the back slashes. Can you comment on a good text editor that works well with php files? Crimson?

"Chooca ma blah blah"

Archived

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

×
×
  • Create New...