|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-10-15 18:55 UTC] iliaa@php.net
[2004-10-18 18:01 UTC] daniel dot gaddis at tlc dot state dot tx dot us
[2004-10-19 09:06 UTC] derick@php.net
[2004-10-19 17:16 UTC] daniel dot gaddis at tlc dot state dot tx dot us
[2004-10-20 21:48 UTC] daniel dot gaddis at tlc dot state dot tx dot us
[2004-11-23 10:52 UTC] vrana@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Thu Oct 30 15:00:01 2025 UTC |
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