Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Annoying Parse Error


battybaby

Recommended Posts

I hope this can be fixed without reinstalling. I was using the built in OSC file manager, I changed the page title from 'oscommerce' to 'admin centre' then pressed save. On the following page I got this error:

 

Parse error: parse error, unexpected T_STRING in /home/httpd/vhosts/mydomain.com/httpdocs/shop/admin/includes/languages/english.php on line 128

 

Warning: Cannot add header information - headers already sent by (output started at /home/httpd/vhosts/mydomain.com/httpdocs/shop/admin/includes/languages/english.php:128) in /home/httpd/vhosts/mydomain.com/httpdocs/catalog/admin/includes/functions/general.php on line 18

 

english.php-

I copied the php code from my english.php and pasted it into EditPlus to locate the line number and hopefully the error.

 

Line number 125-130 looks like this:

 

define('JS_PRODUCTS_MODEL', '* The new product needs a model valuen');
define('JS_PRODUCTS_IMAGE', '* The new product needs an image valuen');
define('JS_SPECIALS_PRODUCTS_PRICE', '* A new price for this product needs to be setn');
define('JS_GENDER', '* The 'Gender' value must be chosen.n');
define('JS_FIRST_NAME', '* The 'First Name' entry must have at least ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.n');
define('JS_LAST_NAME', '* The 'Last Name' entry must have at least ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.n');

 

Like I said, I only changed the page title, I haven't touched this section of code. As for the error pointing at general.php - I haven't altered this page at all, infact the permissions are still so that I can't change it. As per the wiki docs section I deleted any blank spaces at the end of the code but that hasn't made a difference. Is there a PHP genius out there who can help me identify the problem?

Practice safe hex!

Link to comment
Share on other sites

Change

 

define('JS_PRODUCTS_MODEL', '* The new product needs a model valuen');
define('JS_PRODUCTS_IMAGE', '* The new product needs an image valuen');
define('JS_SPECIALS_PRODUCTS_PRICE', '* A new price for this product needs to be setn');
define('JS_GENDER', '* The 'Gender' value must be chosen.n');
define('JS_FIRST_NAME', '* The 'First Name' entry must have at least ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.n');
define('JS_LAST_NAME', '* The 'Last Name' entry must have at least ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.n');

 

to

 

define('JS_PRODUCTS_MODEL', '* The new product needs a model valuen');
define('JS_PRODUCTS_IMAGE', '* The new product needs an image valuen');
define('JS_SPECIALS_PRODUCTS_PRICE', '* A new price for this product needs to be setn');
define('JS_GENDER', '* The \'Gender\' value must be chosen.n');
define('JS_FIRST_NAME', '* The \'First Name\' entry must have at least ' . ENTRY_FIRST_NAME_MIN_LENGTH . ' characters.n');
define('JS_LAST_NAME', '* The \'Last Name\' entry must have at least ' . ENTRY_LAST_NAME_MIN_LENGTH . ' characters.n');

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

BTW, when you say....

 

Like I said, I only changed the page title, I haven't touched this section of code.

 

You are not exactly telling the complete truth, ;)

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

The built in OSC file manager has been known to remove backslashes when editing files - edit your files offline with a text editor and upload to your server.

 

Matti

Link to comment
Share on other sites

Sorry about that. I didn't know about the bug with the OSC file editor, because I've never used it before.

 

So, I guess I falsely accused you.

 

I would suggest though that you get a real editor.

-------------------------------------------------------------------------------------------------------------------------

NOTE: As of Oct 2006, I'm not as active in this forum as I used to be, but I still work with osC quite a bit.

If you have a question about any of my posts here, your best bet is to contact me though either Email or PM in my profile, and I'll be happy to help.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...