Re: [CentOS] Weird problem in PHP 5.1.6/possible bug

2008-10-14 Thread Patrick

Kai Schaetzl wrote:

As you might have seen I actually found a workaround. Your findings on 
CentOS 4 suggest that it is a specific problem on the CentOS/RHEL 5 
platform. The PHP 5 coming with CentOS 5 is set to a locale of C and 
doesn't match the locale of the system! I guess I file a bug now. Thanks!


Kai


No problem !!

:-)

Patrick


___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Weird problem in PHP 5.1.6/possible bug

2008-10-13 Thread Kai Schaetzl
Patrick wrote on Sun, 12 Oct 2008 15:34:03 -0400:

 See above (hope it helps out).

As you might have seen I actually found a workaround. Your findings on 
CentOS 4 suggest that it is a specific problem on the CentOS/RHEL 5 
platform. The PHP 5 coming with CentOS 5 is set to a locale of C and 
doesn't match the locale of the system! I guess I file a bug now. Thanks!

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


[CentOS] Weird problem in PHP 5.1.6/possible bug

2008-10-08 Thread Kai Schaetzl
I hit a weird problem with the default PHP 5.1.6 on CentoS 5.2.

It seems the default 5.1.6 PHP on CentOS has a bug in the functions 
escapeshellargs/escapeshellcmd: it gulps any special (non-ASCII) 
characters, so that they are missing from the output. I have been assured 
that this does not happen on other 5.1.6 or newer on other Linux 
distributions. I don't see this behavior with the exact same $LANG setting 
(en_US.UTF8) on CentOS 4.
Moreover the behavior is different when running the script via console or 
webserver. If I run on console with my $LANG setting of en_US.UTF8 I get 
correct output if the input is UTF-8 (which is still incorrect, if the 
encoding doesn't match it should output garbage and not nothing). Via 
webserver I still get no output with the same characters and encoding of 
the page set to UTF-8.
Could others check on what they have available (other PHP, other 
distributions) and tell the results?

a test page:
?
$test = äöüÄÖÜß;
print $test;
print br\n;
print escapeshellarg($test);
print br\n;
$test = äöüÄÖÜß;
print $test;
print br\n;
print escapeshellarg($test);
?

It will output German umlauts in ISO-8859-1 and UTF-8. Depending on your 
$LANG setting and the coding set to the webpage you may either get some 
correct characters or garbage between ''. The main point is that the 
respective output for lines 1 and 2 and for lines 3 and 4 should be 
*identical* with the exception of the outer single quotes.
The function is supposed to escape single quotes and do nothing else with 
the input (e.g. output as is).
If the output is only '', then there is a bug.

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Weird problem in PHP 5.1.6/possible bug

2008-10-08 Thread Kai Schaetzl
It's not specific to CentOS. I found this bug report
http://bugs.php.net/bug.php?id=44945

It seems that PHP 5 runs with no locale at all and doesn't have access to 
$LANG either. That bug got closed, still I think it's a bug. At least it 
doesn't behave like documented.

Kai

-- 
Kai Schätzl, Berlin, Germany
Get your web at Conactive Internet Services: http://www.conactive.com



___
CentOS mailing list
CentOS@centos.org
http://lists.centos.org/mailman/listinfo/centos