|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2004-01-15 01:12 UTC] sniper@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 10:00:01 2025 UTC |
Description: ------------ Help ! The exec command (see code below) produces unexpected results on my system ( PHP 4.2.1 with an Apache/1.3.24 Server on a HP-UX ) Do you have a solution for this ? Barbara Reproduce code: --------------- <?php error_reporting(E_ALL); $cmd = "mkdir toto" ; echo "<br><pre>"; $err=exec("$cmd 2>&1"); echo $err; echo "</pre>"; ?> Expected result: ---------------- First run : empty result Successive runs : mkdir: cannot create toto: File exists Actual result: -------------- When safe Mode is enabled : This creates 2 directories : "toto" and "2>&1" No errors are reported When safe-mode is disabled, the program gives the expected result