PDA

View Full Version : Headers Content-Type settings?


Auz
02-13-2006, 10:49 PM
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:

>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:

>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

xing
02-13-2006, 11:02 PM
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.

Auz
02-14-2006, 08:25 AM
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.

mistwang
02-14-2006, 10:54 AM
Just create a context with uri "/" pointing to your document root, set "Default Charset" to whatever you like. :-)