LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > [solved] Locale

Reply
 
Thread Tools Display Modes
  #1  
Old 12-09-2012, 04:56 PM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
Default [solved] Locale

I'm having problems with litespeed and locale settings.

I'm running invision power board and I've got the calendar widget on the homepage that displays the date.

The locale setting is set to en_GB in invision, but it dosn't look like litespeed is working with this, as the date formate is still in the american format of MM/DD/YY

I've spent all day trying to figure it out, even submitting a ticket with cpanel, its definitely something to do with litespeed as if if switch back to Apache, then the date format starts to show properly with the UK format, DD/MM/YY.

Is there a setting or something within litespeed that I've missed.

Last edited by NiteWave; 01-10-2013 at 07:38 AM..
Reply With Quote
  #2  
Old 12-09-2012, 05:19 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
I think locale setting should be taken care of the php script (invision power board), or lsphp5.

any difference of phpinfo() between apache and lsws ?
Reply With Quote
  #3  
Old 12-10-2012, 02:31 AM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
Not that I can tell,

Its really puzzling, I've built a matching Php binary, but as soon as I switch to Apache it works with the UK format no problem, switch back to litespeed and it goes back the to US format.
Reply With Quote
  #4  
Old 12-10-2012, 03:28 AM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
looks it can be customized.

in IP.Board's AdminCP
-> Other Apps
-> Calendar
-> Calendar Settings
-> Time / Date Formatting
-> Date format:
there are 4 choices available:
MM/DD/YYYY
YYYY/MM/DD
DD/MM/YYYY
YYYY-MM-DD
Reply With Quote
  #5  
Old 12-10-2012, 06:50 AM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
Quote:
Originally Posted by NiteWave View Post
looks it can be customized.

in IP.Board's AdminCP
-> Other Apps
-> Calendar
-> Calendar Settings
-> Time / Date Formatting
-> Date format:
there are 4 choices available:
MM/DD/YYYY
YYYY/MM/DD
DD/MM/YYYY
YYYY-MM-DD
Well thats what I thought, but its set right in IPB and I've logged a ticket with them and got the following response:

For the date issue, your language packs are correctly set to en_GB so this means that either the en_GB locale is not correctly installed on your web server or your web host is overriding the locale, possibly via a default PHP setting which is why the British locale / date format is not taking affect. Please pass this on to them and ask them to investigate further.


Like I said if I switch back to Apache it works fine, its jsut when running litespeed as the server that it becomes a problem.

I've read that it might be to do with a chroot setting but looking at the litespeed settings the option for chroot are set to no.
Reply With Quote
  #6  
Old 12-10-2012, 12:41 PM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
I've tried some more tests, just to rule out IPB.

I've uploaded a sample php file with the following in:

PHP Code:
<?php
setlocale
(LC_TIME"C");
echo 
strftime("%A");
setlocale(LC_TIME"fi_FI");
echo 
strftime(" in Finnish is %A,");
setlocale(LC_TIME"fr_FR");
echo 
strftime(" in French %A and");
setlocale(LC_TIME"de_DE");
echo 
strftime(" in German %A.\n");
?>
With Apache running I get:

Monday in Finnish is maanantai, in French lundi and in German Montag.

With litespeed running I get:
Monday in Finnish is Monday, in French Monday and in German Monday.
Reply With Quote
  #7  
Old 12-10-2012, 05:18 PM
NiteWave NiteWave is online now
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,226
good test script. I ran it with lsphp5, both on command line and lsws, the result is
Quote:
Tuesday in Finnish is tiistai, in French mardi and in German Dienstag.
so no problem at my test. can you run it at command line:
#/usr/local/lsws/fcgi-bin/lsphp5 /path/to/test.php
Reply With Quote
  #8  
Old 01-07-2013, 06:04 PM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
well i'm really puzzled by this,

I had to leave it and revert back to our old server as I couldn't figure it out, I thought now xmas and the new year is over I'd revisit it, so have quickly set up a test install and the test script seems to be running fine. So not sure what the problem was. I shall look at making the move back over soon and see if I have the same problem.
Reply With Quote
  #9  
Old 01-07-2013, 06:38 PM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
Right I think I've tracked down the problem, its got something to do with APC, as soon as I install it and turn on the caching does the problem appear again. Not sure why it dosn't seem to like litespeed though as if I switch back to apache with APC still running do the locales work fine again.
Reply With Quote
  #10  
Old 01-07-2013, 07:02 PM
akia akia is offline
Member
 
Join Date: May 2012
Posts: 12
I've tried using xcache as well, and that has the same problem.

But not if I run it from the command line.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:20 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.