php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #2587 maybe.. exec function has some problem
Submitted: 1999-10-22 05:46 UTC Modified: 2005-03-31 16:13 UTC
From: chul80 at icm dot re dot kr Assigned:
Status: Wont fix Package: Misbehaving function
PHP Version: 3.0.12 OS: Solaris 2.6
Private report: No CVE-ID: None
 [1999-10-22 05:46 UTC] chul80 at icm dot re dot kr
$command = "/bin/egrep \"(^metal)\" index.forum";
exec($command, $result);
for ($i = 0; $i < sizeof($result); $i++) 
   echo("$result[$i] <br>");

 
in this code, 
Sometimes(!), strings in $result lose his end character.
not always!!  why this blessed array sented to me!!
(please don't blame my english, I am a boy. You are a girl! yah!)

please answer to my problem. is this bug?

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [1999-10-22 07:55 UTC] chul80 at icm dot re dot kr
$command = "/bin/egrep \"(^metal)\" index.forum";
exec($command, $result);
for ($i = 0; $i < sizeof($result); $i++) 
   echo("$result[$i] <br>");

 
in this code, 
Sometimes(!), strings in $result lose his end character.
not always!!  why this blessed array sented to me!!
(please don't blame my english, I am a boy. You are a girl! yeh!)

please answer to my problem. is this bug?


Oh! $result only lose 2byte char...
eeeeeeee
 [2000-03-06 10:50 UTC] hholzgra at cvs dot php dot net
exec() cuts of trailing whitespace characters
from received output lines

it does so by using the isspace() C-function 

so it will cut off any formfeed (0x0C), linefeed (0x0A),
carriage return (0x0D), vertical (0x09) and horizontal
(0x0B) tab characters, and of course space (0x20) itself
when using the default "C" locale

i don't know enough about locales in general and
especially multibyte characters in special, but this
might be the source source of the problem ?

 [2002-02-09 22:32 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
We are sorry, but we do not support PHP 3 related problems anymore.
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Mon Oct 07 23:01:27 2024 UTC