Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Need help with language


Willemo

Recommended Posts

Posted

this comes up, what am I doing wrong?

 

Fatal error: Call to undefined function: date_default_timezone_set() in /usr/local/psa/home/vhosts/mydomein.no/httpdocs/store/catalog/includes/languages/norwegian.php on line 12

 

Hope someone can help

Posted

That function is available only if your PHP version is >= 5.1.0

 

Check what version you have under admin >> tools >> server info

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Posted

Tom,

 

You will have to show us the norwegian.php file

 

 

 

Chris

Posted

You are running on PHP 5.0 or earlier, which does not define this call. Whoever set up the Norwegian language files (including norwegian.php) assumed that everyone would be at PHP 5.1 or higher. Somewhere before the call should be a check that the function exists: if (function_exists('date_default_timezone_set')).... Take a look at the catalog and admin "compatibility.php" files to see how it's done.

 

Or, upgrade to the 21st century and go to PHP 5.1 or 5.2 (avoid 5.3 if on 2.2 RC2a or earlier). PHP 5.3 is OK for osC 2.3.1 or higher. You shouldn't be making a new installation on anything earlier.

Posted

Tom,

 

You will have to show us the norwegian.php file

 

 

 

Chris

 

 

Here is the file

 

<?php

/*

$Id: norwegian.php,v 1.8 2007/06/28 03:13:39 sd_ Exp $

adapted for Separate Pricing Per Customer 2005/02/12

 

osCommerce, Open Source E-Commerce Solutions

http://www.oscommerce.com

Copyright © 2003 osCommerce

Released under the GNU General Public License

Norwegian language files MS2.2

*/

date_default_timezone_set('Europe/Oslo');

// look in your $PATH_LOCALE/locale directory for available locales

// or type locale -a on the server.

// Examples:

// on RedHat try 'en_US'

// on FreeBSD try 'en_US.ISO_8859-1'

// on Windows try 'en', or 'English'

@setlocale(LC_TIME, 'no_NO.ISO8859-1');

Posted

A quick and dirty fix:

if (function_exists('date_default_timezone_set')) date_default_timezone_set('Europe/Oslo');

If it doesn't get called (because you are at PHP 5.0 or earlier), no problem.

Posted

Or change this:

 

date_default_timezone_set('Europe/Oslo');

to:

 

putenv("TZ=Europe/Oslo");

If I suggest you edit any file(s) make a backup first - I'm not perfect and neither are you.

 

"Given enough impetus a parallelogramatically shaped projectile can egress a circular orifice."

- Me -

 

"Headers already sent" - The definitive help

 

"Cannot redeclare ..." - How to find/fix it

 

SSL Implementation Help

 

Like this post? "Like" it again over there >

Archived

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

×
×
  • Create New...