From:             daniel dot gaddis at tlc dot state dot tx dot us
Operating system: windows 2000 service pack 4
PHP version:      4.3.9RC2
PHP Bug Type:     Filesystem function related
Bug description:  win32 safe_mode=on, safe_mode_exec_dir, and exec function

Description:
------------
code on a on windows 2000 service pack 4 system using php 4.3.4 command
line with safe_mode=on, safe_mode_exec_dir, and exec function works
successfully but fails using php 4.3.9RC2 command line. 

I did not test all versions since 4.3.4 but other php command line
versions since 4.3.4 also fail. 

As you can see from example below I am using php.ini-dist and overriding
with:

-d safe_mode=on 
-d safe_mode_gid=On 
-d safe_mode_exec_dir=c:\winnt\system32\

I also...
cd /d C:\WINNT\system32 

...and then run the command line php from the directory shown below:


Reproduce code:
---------------
C:\WINNT\system32>D:\PHP\php-4.3.9RC2\php -c
D:\PHP\php-4.3.9RC2\php.ini-dist -d safe_mode=on -d safe_mode_gid=On -d
safe_mode_exec_dir=c:\winnt\system32\ -r "exec('ping
127.0.0.1',$output,$error); var_dump($output); print ('error code
returned: ' . $error);"


Expected result:
----------------
array(12) {
  [0]=>
  string(0) ""
  [1]=>
  string(40) "Pinging 127.0.0.1 with 32 bytes of data:";
  [2]=>
  string(0) ""
  [3]=>
  string(48) "Reply from 127.0.0.1: bytes=32 time<10ms TTL=128"
  [4]=>
  string(48) "Reply from 127.0.0.1: bytes=32 time<10ms TTL=128"
  [5]=>
  string(48) "Reply from 127.0.0.1: bytes=32 time<10ms TTL=128"
  [6]=>
  string(48) "Reply from 127.0.0.1: bytes=32 time<10ms TTL=128"
  [7]=>
  string(0) ""
  [8]=>
  string(30) "Ping statistics for 127.0.0.1:"
  [9]=>
  string(56) "    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),"
  [10]=>
  string(46) "Approximate round trip times in milli-seconds:"
  [11]=>
  string(49) "    Minimum = 0ms, Maximum =  0ms, Average =  0ms"
}
error code returned: 0


Actual result:
--------------
array(0) {
}
error code returned: 0

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

Reply via email to