#33790 [Opn]: Exec command trims spaces from output

2005-07-20 Thread marcus at names dot co dot uk
 ID:   33790
 User updated by:  marcus at names dot co dot uk
 Reported By:  marcus at names dot co dot uk
 Status:   Open
 Bug Type: Unknown/Other Function
 Operating System: Linux 2.4
 PHP Version:  4.4.0
 New Comment:

Description should read, "all white space 
is removed FROM THE END OF EACH LINE, rather than just 
new line characters".


Previous Comments:


[2005-07-20 17:11:10] marcus at names dot co dot uk

Description:

Each line in the output array returned as the second 
parameter of exec() is trimmed so that all white space 
is removed, rather than just new line characters. 

I found this issue while trying to use the following 
command to find all files in the current directory whose 
name ends in a space:

exec("find . -name '* '",$output_array,$status);

However, in $output_array the filenames have been 
trimmed so that they no longer end in a space.

Reproduce code:
---
exec("find . -name '* '",$output_array,$status);

Expected result:

array(
"file1 "
"file2 "
);

Actual result:
--
array(
"file1"
"file2"
);





-- 
Edit this bug report at http://bugs.php.net/?id=33790&edit=1


#33790 [NEW]: Exec command trims spaces from output

2005-07-20 Thread marcus at names dot co dot uk
From: marcus at names dot co dot uk
Operating system: Linux 2.4
PHP version:  4.4.0
PHP Bug Type: Unknown/Other Function
Bug description:  Exec command trims spaces from output

Description:

Each line in the output array returned as the second 
parameter of exec() is trimmed so that all white space 
is removed, rather than just new line characters. 

I found this issue while trying to use the following 
command to find all files in the current directory whose 
name ends in a space:

exec("find . -name '* '",$output_array,$status);

However, in $output_array the filenames have been 
trimmed so that they no longer end in a space.

Reproduce code:
---
exec("find . -name '* '",$output_array,$status);

Expected result:

array(
"file1 "
"file2 "
);

Actual result:
--
array(
"file1"
"file2"
);

-- 
Edit bug report at http://bugs.php.net/?id=33790&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=33790&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=33790&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=33790&r=trysnapshot51
Fixed in CVS:http://bugs.php.net/fix.php?id=33790&r=fixedcvs
Fixed in release:http://bugs.php.net/fix.php?id=33790&r=alreadyfixed
Need backtrace:  http://bugs.php.net/fix.php?id=33790&r=needtrace
Need Reproduce Script:   http://bugs.php.net/fix.php?id=33790&r=needscript
Try newer version:   http://bugs.php.net/fix.php?id=33790&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=33790&r=support
Expected behavior:   http://bugs.php.net/fix.php?id=33790&r=notwrong
Not enough info: 
http://bugs.php.net/fix.php?id=33790&r=notenoughinfo
Submitted twice: 
http://bugs.php.net/fix.php?id=33790&r=submittedtwice
register_globals:http://bugs.php.net/fix.php?id=33790&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=33790&r=php3
Daylight Savings:http://bugs.php.net/fix.php?id=33790&r=dst
IIS Stability:   http://bugs.php.net/fix.php?id=33790&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=33790&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=33790&r=float
No Zend Extensions:  http://bugs.php.net/fix.php?id=33790&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=33790&r=mysqlcfg


#22919 [Bgs]: Missing server variables

2003-03-27 Thread marcus at names dot co dot uk
 ID:   22919
 User updated by:  marcus at names dot co dot uk
 Reported By:  marcus at names dot co dot uk
 Status:   Bogus
 Bug Type: CGI related
 Operating System: Redhat Linux 7.2
 PHP Version:  4.3.1
 New Comment:

Thanks for the speedy reply - but how come it works in PHP 4.2.3? Has
PHP changed the way in which these variables are set - ie did php not
previously rely on SCRIPT_NAME being passed by the web server?


Previous Comments:


[2003-03-27 08:21:54] [EMAIL PROTECTED]

Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.php.net/manual/ and the instructions on how to report
a bug at http://bugs.php.net/how-to-report.php

SCRIPT_NAME variable is not being exported by the command line or Zeus
server, hence the lack of these two variables.



[2003-03-27 03:34:30] marcus at names dot co dot uk

When building PHP 4.3.1 as a cgi binary, some of the server variables
do not get set correctlt. Most importantly, $PHP_SELF and $SCRIPT_NAME
are missing altogether.

Looking at cgi_main.c, it looks as though $PHP_SELF is inherited from
$SCRIPT_NAME for the CGI version - so perhaps this is why they are both
missing?

I am running under Zeus Web Server 4.2, but the problem is the same
when run from the command line.




-- 
Edit this bug report at http://bugs.php.net/?id=22919&edit=1



#22920 [NEW]: Post variables problem with CGI version

2003-03-27 Thread marcus at names dot co dot uk
From: marcus at names dot co dot uk
Operating system: RedHat Linux 7.2
PHP version:  4.3.1
PHP Bug Type: Variables related
Bug description:  Post variables problem with CGI version

When running 4.3.1 as a CGI binary, with register_globals set to 'on', the
first post variable contains all post variables.

For example, if you have a form with the variables (fields) and values
var1=1, var2=2, var3=3, the following variables are set in the target
script:

var1=1&var2=2&var3=3
var2=2
var3=3

I am running the CGI under Zeus Web Server 4.2. I am not sure whether the
$HTTP_POST_VARS array is set correctly, and cannot check this as I have
had to revert back to 4.2.3.
-- 
Edit bug report at http://bugs.php.net/?id=22920&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22920&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22920&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22920&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22920&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22920&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22920&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22920&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22920&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22920&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22920&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22920&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22920&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22920&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22920&r=gnused



#22919 [NEW]: Missing server variables

2003-03-27 Thread marcus at names dot co dot uk
From: marcus at names dot co dot uk
Operating system: Redhat Linux 7.2
PHP version:  4.3.1
PHP Bug Type: CGI related
Bug description:  Missing server variables

When building PHP 4.3.1 as a cgi binary, some of the server variables do
not get set correctlt. Most importantly, $PHP_SELF and $SCRIPT_NAME are
missing altogether.

Looking at cgi_main.c, it looks as though $PHP_SELF is inherited from
$SCRIPT_NAME for the CGI version - so perhaps this is why they are both
missing?

I am running under Zeus Web Server 4.2, but the problem is the same when
run from the command line.
-- 
Edit bug report at http://bugs.php.net/?id=22919&edit=1
-- 
Try a CVS snapshot: http://bugs.php.net/fix.php?id=22919&r=trysnapshot
Fixed in CVS:   http://bugs.php.net/fix.php?id=22919&r=fixedcvs
Fixed in release:   http://bugs.php.net/fix.php?id=22919&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=22919&r=needtrace
Try newer version:  http://bugs.php.net/fix.php?id=22919&r=oldversion
Not developer issue:http://bugs.php.net/fix.php?id=22919&r=support
Expected behavior:  http://bugs.php.net/fix.php?id=22919&r=notwrong
Not enough info:http://bugs.php.net/fix.php?id=22919&r=notenoughinfo
Submitted twice:http://bugs.php.net/fix.php?id=22919&r=submittedtwice
register_globals:   http://bugs.php.net/fix.php?id=22919&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=22919&r=php3
Daylight Savings:   http://bugs.php.net/fix.php?id=22919&r=dst
IIS Stability:  http://bugs.php.net/fix.php?id=22919&r=isapi
Install GNU Sed:http://bugs.php.net/fix.php?id=22919&r=gnused