Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

what dose this mean please


Snaper

Recommended Posts

I cannot get onto the website or admin site, i keep getting this error.

 

Parse error: syntax error, unexpected T_IF in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 292

 

code lines 288 to 300

 

// include the language translations

require(DIR_WS_LANGUAGES . $language .usr/lib/php

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {

$currency = $HTTP_GET_VARS['currency'];

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

 

 

AND for the ADMIN

 

Parse error: syntax error, unexpected T_VARIABLE in /homepages/18/d35323855/htdocs/Jolove/catalog/admin/includes/application_top.php on line 158

 

 

code lines 156 to 161

 

// include the language translations

require(DIR_WS_LANGUAGES . $language .'.usr/lib/php')

$current_page = basename($PHP_SELF);

if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {

include(DIR_WS_LANGUAGES . $language . '/' . $current_page);

}

 

Can anyone help please.

Link to comment
Share on other sites

I cannot get onto the website or admin site, i keep getting this error.

 

Parse error: syntax error, unexpected T_IF in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 292

 

code lines 288 to 300

 

// include the language translations

require(DIR_WS_LANGUAGES . $language .usr/lib/php

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {

$currency = $HTTP_GET_VARS['currency'];

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

 

 

AND for the ADMIN

 

Parse error: syntax error, unexpected T_VARIABLE in /homepages/18/d35323855/htdocs/Jolove/catalog/admin/includes/application_top.php on line 158

 

 

code lines 156 to 161

 

// include the language translations

require(DIR_WS_LANGUAGES . $language .'.usr/lib/php')

$current_page = basename($PHP_SELF);

if (file_exists(DIR_WS_LANGUAGES . $language . '/' . $current_page)) {

include(DIR_WS_LANGUAGES . $language . '/' . $current_page);

}

 

Can anyone help please.

 

 

 

What dose this mean T_IF error

 

Help Please.

Link to comment
Share on other sites

The problem for both seems to be

require(DIR_WS_LANGUAGES . $language .usr/lib/php

That's not statndard oscommerce code so you will need to trace down the problem in it.

 

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

Link to comment
Share on other sites

you've missed out semi colons on the previous lines.

 

as it stands the entire of:

 

// include the language translations
require(DIR_WS_LANGUAGES . $language .usr/lib/php

// currency
if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

 

is technically one line of php, as far as your server is concerned. hence "syntax" error, and why there's an unexpected "T_IF" (if statment) - because it's in the middle of a line.

 

sitck ; at the end of the previous lines - after require(DIR_WS_LANGUAGES . $language .usr/lib/php

 

 

you've also missed out the close brakcet/parenthesis on that line (289)

osCommerce is GREAT. When it works...

Link to comment
Share on other sites

The problem for both seems to be
require(DIR_WS_LANGUAGES . $language .usr/lib/php

That's not statndard oscommerce code so you will need to trace down the problem in it.

 

Jack

 

 

Thanks for the reply i will have a look, don't realy understand what i am doing but i will have a go!!!

Link to comment
Share on other sites

The problem is that that line is not valid. If you don't know where it came fron, you may have a very difficult time figuring it out. And since it is not standard, it's unlikely anyone here will be able to help you. Good luck.

 

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

Link to comment
Share on other sites

The problem is that that line is not valid. If you don't know where it came fron, you may have a very difficult time figuring it out. And since it is not standard, it's unlikely anyone here will be able to help you. Good luck.

 

Jack

 

Ok i been trying and now have a different error, any chance you can advise or help please.

 

Code: from 288 to 300

 

// include the language translations

require(DIR_WS_LANGUAGES . $language 'includes/languages/.php');

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {

$currency = $HTTP_GET_VARS['currency'];

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

 

Error message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 289

 

Also the same thing for admin but a different line number.

 

Help please.

 

Alan

Link to comment
Share on other sites

Ok i been trying and now have a different error, any chance you can advise or help please.

 

Code: from 288 to 300

 

// include the language translations

require(DIR_WS_LANGUAGES . $language 'includes/languages/.php');

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {

$currency = $HTTP_GET_VARS['currency'];

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

 

Error message:

 

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 289

 

Also the same thing for admin but a different line number.

 

Help please.

 

Alan

 

 

You seem to have incorrectly modified the file, are you just guessing at changes??

 

// include the language translations

require(DIR_WS_LANGUAGES . $language 'includes/languages/.php');

 

should be:

 

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

You seem to have incorrectly modified the file, are you just guessing at changes??

 

// include the language translations

require(DIR_WS_LANGUAGES . $language 'includes/languages/.php');

 

should be:

 

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

 

Thanks for the quick reply i am getting desperate now.

 

Ok i am a little in the dark with what i am doing with the code, i think this is how it was. Now i get this error.

 

 

Warning: main(includes/languages/.php) [function.main]: failed to open stream: No such file or directory in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 289

 

Fatal error: main() [function.require]: Failed opening required 'includes/languages/.php' (include_path='.:/usr/lib/php') in /homepages/18/d35323855/htdocs/Jolove/catalog/includes/application_top.php on line 289

 

 

Code from 288 to 300

 

// include the language translations

require(DIR_WS_LANGUAGES . $language .'.php');

 

// currency

if (!tep_session_is_registered('currency') || isset($HTTP_GET_VARS['currency']) || ( (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') && (LANGUAGE_CURRENCY != $currency) ) ) {

if (!tep_session_is_registered('currency')) tep_session_register('currency');

 

if (isset($HTTP_GET_VARS['currency']) && $currencies->is_set($HTTP_GET_VARS['currency'])) {

$currency = $HTTP_GET_VARS['currency'];

} else {

$currency = (USE_DEFAULT_LANGUAGE_CURRENCY == 'true') ? LANGUAGE_CURRENCY : DEFAULT_CURRENCY;

}

}

 

Can you help please. thank you.

Link to comment
Share on other sites

Your problem is not with this piece of code.

 

$language is not getting set, its set by the class, iether there is a problem there or (more likely) your setting are wrong.

 

What language is the store set to?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Your problem is not with this piece of code.

 

$language is not getting set, its set by the class, iether there is a problem there or (more likely) your setting are wrong.

 

What language is the store set to?

 

Uniten Kindom, British

Link to comment
Share on other sites

Uniten Kindom, British

 

 

Dose this help

 

in the includes/languages/english.php file

 

 

code: line 152 to 160

 

// pull down default text

define('PULL_DOWN_DEFAULT', 'Please Select');

define('TYPE_BELOW', 'Type Below');

 

// javascript messages

define('JS_ERROR', 'Errors have occured during the process of your form.\n\nPlease make the following corrections:\n\n');

 

define('JS_REVIEW_TEXT', '* The \'Review Text\' must have at least ' . REVIEW_TEXT_MIN_LENGTH . ' characters.\n');

define('JS_REVIEW_RATING', '* You must rate the product for your review.\n');

Link to comment
Share on other sites

language should be set to english, british is not a language!!

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

language should be set to english, british is not a language!!

 

 

Yes sorry i think is was english, but was not sure. can you please tell me how to check the code and were to see or change the currency. I cannot open the website or admin so need to do it by code? Thanks Alan

Link to comment
Share on other sites

I suspect you edited your language and left the diectory entry empty, instead of english in there

 

 

The trouble is the entry is in your dbase so you need to use phpMyAdmin to edit that to correct!!

 

I suspect that may be beyond you, so I advise putting a hard coded workaround till you can get back into admin to fix.

 

just before:

 

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

 

add:

 

$language = 'english'; // temporary fix

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

I suspect you edited your language and left the diectory entry empty, instead of english in there

 

 

The trouble is the entry is in your dbase so you need to use phpMyAdmin to edit that to correct!!

 

I suspect that may be beyond you, so I advise putting a hard coded workaround till you can get back into admin to fix.

 

just before:

 

// include the language translations

require(DIR_WS_LANGUAGES . $language . '.php');

 

add:

 

$language = 'english'; // temporary fix

 

Brillant many thanks.

 

I can now get into my admin i will have a look around and find the problem, when i have corrected it do i remove the FIX you gave me!!

 

One more think if you can help, i think this is when the problem started. In the "check out" i cannot get the "payment options" to show, any idea.

 

Once again many thanks. Alan

Link to comment
Share on other sites

when i have corrected it do i remove the FIX you gave me!!

 

Yes.

 

Hard to tell, could be many causes. perhaps your currancies are wrong too.

 

Setting should be:

 

Title: UK Pounds

Code: GBP

Symbol Left: £

Symbol Right:

Decimal Point: .

Thousands Point: ,

Decimal Places: 2

Value: 1.00000000

 

What version osC is it?

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Yes.

 

Hard to tell, could be many causes. perhaps your currancies are wrong too.

 

Setting should be:

 

Title: UK Pounds

Code: GBP

Symbol Left: £

Symbol Right:

Decimal Point: .

Thousands Point: ,

Decimal Places: 2

Value: 1.00000000

 

What version osC is it?

 

2.2 rc1

 

I wili check this out ........... another thing has happened sinc i have got back in admin ...... all my "Categories" have gone and when i add new ones they dont show?

 

Also what should the ISO code be?

 

I wish i could know more. many thanks.

Link to comment
Share on other sites

ISO-8859-1

 

perhaps your dbase is corrupt?

 

 

in phpMyAdmin select your dbase then the repair option

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

Archived

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

×
×
  • Create New...