Headers Content-Type settings?

Discussion in 'Install/Configuration' started by Auz, Feb 14, 2006.

  1. Auz

    Auz New Member

    I recently migrated from apache, and everything has been working fine. However, I noticed some differences with the headers. When I access a test php script in Apache I get this:

    Code:
    >lynx --mime_header http://www.path/file.php
    HTTP/1.1 200 OK
    Date: Tue, 14 Feb 2006 06:31:39 GMT
    Server: Apache/2.0.52 (Gentoo/Linux)
    Content-Length: 120
    Connection: close
    Content-Type: text/html; charset=ISO-8859-1
    When I do the same with Litespeed:

    Code:
    >lynx --mime_header http://www.path/file.php
    HTTP/1.0 200 OK
    Content-type: text/html
    Content-Length: 120
    Server: LiteSpeed
    Date: Tue, 14 Feb 2006 06:39:08 GMT
    Connection: close
    That charset=ISO-8859-1 makes the pages display correctly. I know I can add it to the headers in my php code but is there a way in lsws?

    thanks
    -auz
  2. xing

    xing LiteSpeed Staff

    Auz,

    php.ini doc:

    http://us3.php.net/ini.core

    Try setting "default_charset = xxxx" within php.ini.

    You can add default charset with litespeed "contexts" but there is no default charset setting at global vhost or server level.
  3. Auz

    Auz New Member

    I am aware I can do that, but in the snippets I posted above, the php.ini's are the same- with the default charset commented out. Plus apache uses that content-type even on non php pages, so it seems to me that there is a default value in apache, and I thought there might be one in litespeed.
  4. mistwang

    mistwang LiteSpeed Staff

    Just create a context with uri "/" pointing to your document root, set "Default Charset" to whatever you like. :)

Share This Page