Hi, i hope this is the right location to ask for help.
The Used Distribution is:
SLES 10 with Service Pack 1
Installed APACHE Version:
Apache/2.2.3 (Linux/SUSE)
Apache API Version 20051115
APACHE Modules:
|
Code:
|
core_module (static), mpm_prefork_module (static), http_module (static), so_module (static)
authz_host_module (shared)
actions_module (shared)
alias_module (shared)
asis_module (shared)
auth_basic_module (shared)
authz_groupfile_module (shared)
authn_file_module (shared)
authz_user_module (shared)
autoindex_module (shared)
cgi_module (shared)
dir_module (shared)
rewrite_module (shared)
env_module (shared)
include_module (shared)
log_config_module (shared)
mime_module (shared)
negotiation_module (shared)
setenvif_module (shared)
status_module (shared)
userdir_module (shared)
imagemap_module (shared)
mime_magic_module (shared)
ssl_module (shared)
vhost_alias_module (shared)
php5_module (shared)
python_module (shared)
authz_default_module (shared) |
Only basic configurations are made in httpd.conf just enough to run a vhost.
If i did not oversee any option the problem should not be here.
Installed GD-2.0.28 (bundled from PHP5):
with support:
* JIS-mapped Japanese Font Support
* FreeType Support: enabled, linkage -> Freetype 2.1.10
* JPEG, GIF, PNG ... Support
My assumption that the Problem comes from JIS-mapped Japanese Support,
i could disable it by manually compile PHP5, but that not an option i can take.
Installed Freetype Version 2.1.10
Installed PHP5.1.2 which comes with SLES10:
Enabled Modules In default Configuration:
|
Code:
|
mhash, gd, mysql, xmlreader, iconv, tokenizer, curl, dom, odbc
mysqli, posix, gettext, gmp, wddx, pspell, shmop
calendar, mcrypt, fastcgi, ctype, xsl, exif, snmp, bcmath
sysvshm, sysvsem, xmlrpc, mbstring, ncurses, pear, openssl
soap, sockets, ldap, zlib, pdo, pcntl, sysvmsg |
Differences to Default php.ini
|
Code:
|
--- php.ini (Default )
+++ php.ini (My Config)
max_execution_time = 30 ; Maximum execution time of each script, in seconds
max_input_time = 60 ; Maximum amount of time each script may spend parsing request data
-memory_limit = 8M ; Maximum amount of memory a script may consume (8MB)
+memory_limit = 512M ; Maximum amount of memory a script may consume (8MB)
-register_globals = Off
+register_globals = On
+extension=oci8.so
-session.gc_maxlifetime = 1440
+session.gc_maxlifetime = 5400
[mbstring]
;mbstring.language = Japanese
+mbstring.language = Neutral
; internal/script encoding.
; Some encoding cannot work as internal encoding.
; (e.g. SJIS, BIG5, ISO-2022-*)
;mbstring.internal_encoding = EUC-JP
+mbstring.internal_encoding = UTF-8
; http input encoding.
-;mbstring.http_input = auto
+mbstring.http_input = "UTF-8"
; http output encoding. mb_output_handler must be
; registered as output buffer to function
;mbstring.http_output = SJIS
+mbstring.http_output = "UTF-8"
-;mbstring.encoding_translation = Off
+mbstring.encoding_translation = On
; automatic encoding detection order.
; auto means
-;mbstring.detect_order = auto
+mbstring.detect_order = auto
-;exif.encode_unicode = ISO-8859-15
+exif.encode_unicode = ISO-8859-15
;exif.decode_unicode_motorola = UCS-2BE
;exif.decode_unicode_intel = UCS-2LE
;exif.encode_jis = |
Used PHP Code as Example:
|
Code:
|
<?php
// Set the content-type
header("Content-type: image/png");
$im = imagecreatetruecolor(400, 30);
// Create some colors
$white = imagecolorallocate($im, 255, 255, 255);
$grey = imagecolorallocate($im, 128, 128, 128);
$black = imagecolorallocate($im, 0, 0, 0);
imagefilledrectangle($im, 0, 0, 399, 29, $white);
// The text to draw
$text = 'Testing... Umlaute äöü';
// Replace path by your own font path (i used windows arial.ttf, it contains my needed characters, almost any other common font has too)
$font = 'arial.ttf';
// Add some shadow to the text
imagettftext($im, 20, 0, 11, 21, $grey, $font, $text);
// Add the text
imagettftext($im, 20, 0, 10, 20, $black, $font, $text);
// Using imagepng() results in clearer text compared with imagejpeg()
imagepng($im);
imagedestroy($im);
?> |
The Result on another Linux Server is that the Image is created correctly corresponding to the "$text" defined above,
On the SLES 10 + SP1 Server the Result is that the letters 'äöü' are replaced by Squares.
Example Links:
http://img376.imageshack.us/img376/1...emgddf6.th.png
http://img381.imageshack.us/img381/4...10gdzn8.th.png
I assume that the Problem accures because of missconfigured or notconfigured encoding or GD because of the JIS-mapped Japanese Font Support.
I need a solution to this Problem, without manually Compiling PHP5 or Updating the System.
Also helpfull, if this Problem is not solvable under this conditions, a serious Source where this problem is stated.
(eg. SuSe/Novell Supporter; Knowlegebase Link, Or a changelog from PHP/GD etc where this problem is mentioned.
I searched already for my self but was not successfull, perhaps someone had this problem before).
Any ideas or help is most welcome.