Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with error on english.php file


Guest

Recommended Posts

Posted

I made a simple change to catalog/includes/languages/english.php

 

To change one heading from 'News Bulletin' to 'Latest News', I know get the following error when I access my store's url

 

"Parse error: parse error, unexpected T_STRING in /home/bando2/public_html/store/includes/languages/english.php on line 95"

 

I'm not PHP literate so I've got no clue what this means or how to fix it, I was extra careful to not touch anything else on the file and left all symbols and quotation marks as is.

 

With this I discovered that my coworker had destroyed the backup file by placing the floppy on top of a speaker so I need to know what I need to do to fix this error and have the store back online.

 

Thanks in advance for your assistance

Posted

I was able to locate an older secondary backup (CD this time) and was able to restore the english.php file so everything works.

 

I would still appreciate any insight and feedback on this issue as I would like to change the heading and I've never had any problems before with simple changes like this.

 

Thanks

Posted
Can't give you much insight or feedback unless you tell us exactly what you did and how you did it.  What change were you trying to make?  Again, post the lines of code as you wanted them to be.

 

This is what I did:

 

I took this code:

 

// information box text in includes/boxes/information.php

 

define('BOX_HEADING_INFORMATION', 'Information');

 

define('BOX_INFORMATION_ABOUTUS', 'About Us');

 

define('BOX_INFORMATION_NEWS', 'News Bulletin');

 

define('BOX_INFORMATION_FORUM', 'Forums / Message Board');

 

define('BOX_INFORMATION_CONDITIONS', 'Conditions of Use');

 

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

 

define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');

 

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

 

And changed 2 lines as follows:

 

// information box text in includes/boxes/information.php

 

define('BOX_HEADING_INFORMATION', 'Information');

 

define('BOX_INFORMATION_ABOUTUS', 'About Us');

 

define('BOX_INFORMATION_NEWS', 'Latest News');

 

define('BOX_INFORMATION_FORUM', 'Forums / Message Board');

 

define('BOX_INFORMATION_CONDITIONS', 'Terms of Service');

 

define('BOX_INFORMATION_SHIPPING', 'Shipping & Returns');

 

define('BOX_INFORMATION_PRIVACY', 'Privacy Notice');

 

define('BOX_INFORMATION_CONTACT', 'Contact Us');

 

 

I saved the file and started to get the error above, it got fixed as soon as a reverted to the original file.

 

I hope this is what you needed.

 

Thanks.

Posted
It looks fine, but how did you upload it?  FTP?  And are those lines 90-100?

 

 

How do I know if these are lines 90-100? Notepad doesn't give me line numbers. This is the only part of the file that got touched at all.

 

I uploaded it using the upload button in osCommerce's File Manager.

Posted

The reason you had the parse error is because you used the osCommerce File Manager to edit files. Read the 'Parse Error' link below my name for the correct way to edit files.

 

Also you need to download a good (free) plain text editor like Text Pad or Crimson Editor - which gives you line numbers.

 

Vger

Posted
The reason you had the parse error is because you used the osCommerce File Manager to edit files.  Read the 'Parse Error' link below my name for the correct way to edit files.

 

Also you need to download a good (free) plain text editor like Text Pad or Crimson Editor - which gives you line numbers.

 

Vger

 

Thank you for the advise, I'll certainly implement it for all future file updates and uploads.

Posted

1. If you're going to change PHP code, get an editor that can handle line numbers!

 

http://www.php-editors.com/

 

There are plenty of free one available.

 

2. The File Manager is well known to be buggy. Do not use it to edit files. I do not know if the upload function will cause the same errors, but there's no reason to use it when it's known to have some big issues. Use an FTP program instead to transfer your files. They're more powerful, faster, and IMO easier to use.

Contributions

 

Discount Coupon Codes

Donations

Posted

Now that I know these tips I have downloaded the Crimson editor and will use ftp in the future, thanks for the advice.

Archived

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

×
×
  • Create New...