why is this shell_exec() failing to execute my shell to create a symlink?

From: Date: Sat, 27 Jun 2009 20:46:22 +0000
Subject: why is this shell_exec() failing to execute my shell to create a symlink?
Groups: php.general 
Request: Send a blank email to php-general+get-294678@lists.php.net to get a copy of this message
this code: <?php $testOutput = shell_exec("ls"); $where2cd2='testDir/'; $firstCMD="cd $where2cd2"; $firstOutput = shell_exec("$firstCMD"); // $firstOutput = shell_exec('cd testDir/'); $testOutput2 = shell_exec("ls"); $secondCMD='ln -s amex_cid.gif myccGOV.gif'; $secondOutput = shell_exec("$secondCMD"); echo "testOutput:<br><pre>$testOutput</pre>"; echo "testOutput2:<br><pre>$testOutput2</pre><br>firstCMD=$firstCMD<hr>"; echo "firstOutput:<br><pre>$firstOutput</pre><br>secondCMD=$secondCMD<hr>"; echo "secondOutput:<br><pre>$secondOutput</pre><br>thirdCMD=$thirdCMD<hr>"; ?> is not producing the symlink that I think it should. (?!?) (neither in the dir/ where this script lives, nor in the testDir/ where I am actually trying to create it, on the fly. Server is not in safe mode. ------------ Govinda govinda.webdnatalk@gmail.com

« previous php.general (#294678) next »