Hi,
I've got the following problem: exec() and shell_exec(), etc. don't give
anything back, just the error code 127 (command not found?!)
For example, the following script:
<?php
exec("cat ./test", $lines, $result);
// or exec("./cat ./test", $lines, $result);
echo "result = $result<br>";
echo "Lines<br>\n";
foreach ($lines as $k => $v) {
echo "k=$k v=$v<br>\n";
}
?>
causes on my homeserver just
result = 127
Lines
whereas the provider's server makes it the right way:
result = 0
Lines
k=0 v=msdflkdsfkldffdf
k=1 v=fdfdlkmdfklfdkflfd
k=2 v=fdfldkkfdklfdlkfdlkfdlkfd
k=3 v=fdfdkfdklfdklfklfdlkdffd
k=4 v=fdfkfdkldfkjdflkfdklfdlkfdf
k=5 v=dfdkldflfdkkdflkflk
System: Debian / Apache 2.0 + PHP 4.3.2 as module
what's wrong?
thanks