Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Parse error: syntax error, unexpected T_CLASS in /includes/modules/shipping/freeamount.php on line 1


Recommended Posts

Posted

Hi All,

 

I've just had to swap a clients site from his previous host across to my server and just dumped the db and the files from the old server onto mine - nice and easy (changed the db details aswell).

 

I've basically just run a test and i'm getting this error occur:

 

Parse error: syntax error, unexpected T_CLASS in /path/to/the/includes/modules/shipping/freeamount.php on line 1

 

which reads:

 

<?php

 

I've checked the file and its fine, the same system set up is used on another site and thats not returning the error, anybody got any ideas?

 

Thanks in advance

 

Rob

Posted

Hi yep,

 

basically the domain is the same so all i've done is taken over the hostig of the site, therefore i just updated the db variables, the domain and structure etc have not altered, everything else works fine apart from that one file.

 

It's really thrown me this time as i've done similar things before and never encountered a problem.

 

I have deactivated the https:// variable though as the previous web developer used it for the accounts and i'm not as all payments are taken via hsbc, but apart from that nothing has changed, so could that be causing the problem?

 

Thanks,

 

Rob

Posted
Hi yep,

 

basically the domain is the same so all i've done is taken over the hostig of the site, therefore i just updated the db variables, the domain and structure etc have not altered, everything else works fine apart from that one file.

 

It's really thrown me this time as i've done similar things before and never encountered a problem.

 

I have deactivated the https:// variable though as the previous web developer used it for the accounts and i'm not as all payments are taken via hsbc, but apart from that nothing has changed, so could that be causing the problem?

 

Thanks,

 

Rob

 

when you changed the configure files you have accidentally deleted a comma or something

 

post your configure file minus the database info

 

Regards

Regards

 

Mark A Reynolds

Posted (edited)

Hi Config file shown below:

 

  define('HTTP_SERVER', 'http://www.cartridges4less.co.uk'); // eg, http://localhost - should not be empty for productive servers
 define('HTTPS_SERVER', ''); // eg, https://localhost - should not be empty for productive servers
 define('ENABLE_SSL', FALSE); // secure webserver for checkout procedure?
 define('HTTP_COOKIE_DOMAIN', 'www.cartridges4less.co.uk');
 define('HTTPS_COOKIE_DOMAIN', '');
 define('HTTP_COOKIE_PATH', '/');
 define('HTTPS_COOKIE_PATH', '/');
 define('DIR_WS_HTTP_CATALOG', '/');
 define('DIR_WS_HTTPS_CATALOG', '/');
 define('DIR_WS_IMAGES', 'images/');
 define('DIR_WS_ICONS', DIR_WS_IMAGES . 'icons/');
 define('DIR_WS_INCLUDES', 'includes/');
 define('DIR_WS_BOXES', DIR_WS_INCLUDES . 'boxes/');
 define('DIR_WS_FUNCTIONS', DIR_WS_INCLUDES . 'functions/');
 define('DIR_WS_CLASSES', DIR_WS_INCLUDES . 'classes/');
 define('DIR_WS_MODULES', DIR_WS_INCLUDES . 'modules/');
 define('DIR_WS_LANGUAGES', DIR_WS_INCLUDES . 'languages/');

 

Cheers,

 

Rob

Edited by Trimast
Posted

Hi,

 

I've taken it down whilst the problem still occurs, basically its now only occuring when i go to the checkout page, i've not changed anything either ... most strange.

 

Thanks,

 

Rob

Posted

Hi,

 

Just to update, i ended up copying a different copy of this file to the server and it worked fine. Couldn't find the difference but it working now which is good.

 

Thanks to all who helped.

 

Rob

  • 8 months later...
Posted

i had a similar error but on a different file ..

 

Parse error: syntax error, unexpected T_CLASS in /includes/classes/http_client.php on line 1

 

thanks to the cue above, i simply copied over the same file from the original tar, and its ok now. my case may be even stranger because i didnt even edit the file!

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...