Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 26th September 2007, 13:30
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 9 Times in 9 Posts
Thumbs down ISPConfig, Apache, encodings and charsets problem...

Hello all,

This is my experience with the above issue. I want to discuss it here so as to enhance my configuration, and to find any possible bugs in ISPConfig, understanding better its logic.

1) First of all I have set the following options in /home/admispconfig/ispconfig/lib/config.inc.php because I use the greek translation of ISPConfig:

Code:
$go_info["server"]["salutatory_email_charset"] = 'iso-8859-7';
$go_info["theme"]["charset"] = "iso-8859-7";
If I set IE6 and FF2 to "Auto encoding selection", although everything displays just fine in ISPConfig's panel, _sometimes_ the left tree pane is encoded probably as ISO-8859-1 and thus it is displayed improperly. If I force the browser to encode the page as ISO-8859-7, everything is correct. Why is this happening and how can I solve this?

2) When I create a new website, the default ISPConfig's index.html is being copied in the websites dir. However, this page (which is also in greek because of the translation I use I suppose) does not contain any greek specific encoding code inside. This has a strange effect in IE6: It does not display anything at all (white page) when you try to access the site - even if you force the browser to use the ISO-8859-7 charset manually. FF2 on the other side, displays the page but in UTF-8 (so you can't read the content at all) and if you force it to use the greek charset, the page displays properly.

I have found these pages in /root/ispconfig/isp/* and added the following code to all of them (just before the </title> tag):

Code:
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-7">
I 've also added this code to the index.html of the already-created website to see what's happening. IE6 still refuses to show anything of that page (just a white page, although the HTML is transfered to the browser - you can see the source) and FF2 still encodes the page as UTF-8 (with auto encoding selection).

Things change if I add the following directive as an extra Apache parameter in ISPConfig for the specific website:

Code:
AddType 'text/html; charset=iso-8859-7' html
IE6 displays the page properly, however FF2 still encodes it as UTF-8. If I force FF2 to use the greek charset manually, it displays it properly.

So please tell me what to do and how to configure this thing so as to use ONLY iso-8859-7 all the time and collaborate with the browsers just fine?

The solution to add each time manually directives for the Apache is not practical... There must be a way...

Thank you all in advance,
Reply With Quote
Sponsored Links
  #2  
Old 26th September 2007, 13:50
erebus erebus is offline
Member
 
Join Date: Sep 2007
Posts: 63
Thanks: 10
Thanked 9 Times in 9 Posts
Thumbs up

Ok it seems I have found a quick way to solve all of these problems. For the records, I note it down here:

Add the following global directive to /etc/httpd/conf/httpd.conf (for the global Apache) and to /root/ispconfig/httpd/conf/httpd.conf (for ISPConfig's Apache to port 81).

Code:
AddDefaultCharset ISO-8859-7
Restart your global Apache:

Code:
/etc/init.d/httpd restart
and ISPConfig's Apache:

Code:
killall -1 ispconfig_httpd
Everything should display just fine now!

However what I haven't tested yet, is if an html document can override this setting (either with a metatag inside the html or with another directive in .htaccess or in ISPConfig's specific Apache options). If anyone knows, please share.

Thank you all for reading.
Reply With Quote
The Following User Says Thank You to erebus For This Useful Post:
falko (27th September 2007)
Reply

Bookmarks

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 +2. The time now is 03:58.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.