lshttpd+php pl_PL locale issue

Discussion in 'Install/Configuration' started by pawelz, Oct 5, 2010.

  1. pawelz

    pawelz New Member

    I have two virtual hosts configured in litespead, let's call them and These vhosts have very similar configuration:

    --- Example.xml	2010-10-05 13:56:15.479451164 +0200
    +++ ExampleBETA.xml	2010-10-05 13:55:28.741356271 +0200
    @@ -1,14 +1,14 @@
     <?xml version="1.0" encoding="UTF-8"?>
    -  <docRoot>$VH_ROOT/html</docRoot>
    +  <docRoot>$VH_ROOT/beta</docRoot>
    -      <fileName>$VH_ROOT/errorlog/$VH_NAME.error.log</fileName>
    -      <logLevel>INFO</logLevel>
    +      <fileName>/var/log/http/$VH_NAME.error.log</fileName>
    +      <logLevel>ERROR</logLevel>
    @@ -18,7 +18,7 @@
    -      <keepDays>7</keepDays>
    +      <keepDays>30</keepDays>
    @@ -33,7 +33,7 @@
    -      <handler>Example</handler>
    +      <handler>ExampleBETA</handler>
    @@ -41,21 +41,15 @@
    -  <security>
    -    <accessControl>
    -      <allow></allow>
    -      <deny></deny>
    -    </accessControl>
    -  </security>
    -      <name>Example</name>
    -      <address>uds://tmp/lshttpd/Example.sock</address>
    +      <name>ExampleBETA</name>
    +      <address>uds://tmp/lshttpd/ExampleBETA.sock</address>
    -      <maxConns>80</maxConns>
    +      <maxConns>50</maxConns>
    -      <env>PHP_LSAPI_CHILDREN=80</env>
    +      <env>PHP_LSAPI_CHILDREN=50</env>
    @@ -70,8 +64,8 @@
    -      <memSoftLimit>0</memSoftLimit>
    -      <memHardLimit>0</memHardLimit>
    +      <memSoftLimit>400M</memSoftLimit>
    +      <memHardLimit>500M</memHardLimit>
    @@ -79,6 +73,5 @@
    -    <rules></rules>
    The problem is, on locales work, while on don't work. The simplest test case is the following php script:

    setlocale(LC_ALL, 'pl_PL.utf-8');
    echo strftime("%A %d %B %Y", time());
    On, as excpected, it prints date in polish locale:
    wtorek 05 pa┼║dziernik 2010
    On it prints date in C locale:
    Tuesday 05 October 2010
    Could you please give me some hints what I missed, why behavior of almost identical vhosts may differ?

    Thanks in advance.
  2. mistwang

    mistwang LiteSpeed Staff

    check phpinfo page for the locale in effective.
  3. pawelz

    pawelz New Member

    [RESOLVED] lshttpd+php pl_PL locale issue

    It seems to have something to do with memory limits.

    I had increased memory limits to:
    Memory Soft Limit (bytes) 400M
    Memory Hard Limit (bytes) 500M
    and it resolved my problem.

    I did some tests to confirm that, I'm able to reproduce it: it does not work with memory limits 250M/300M, while it works with 400M/500M.

    The issue is resolved for me, however It seems more workaround than solution. I don't understand why memory limit affects locale behavior. Is it bug?

Share This Page