hi
i've got a script that for some reason is giving the error:
sh: /ls: No such file or directory
and yet ls works if i run from the command line in ssh but running the very same line from the script gives this error.
the line that's causing the error is:
$list=exec("ls /home/*/domains/*/public_html | grep public_html | tr -d '\n'");
and yet if i run:
ls /home/*/domains/*/public_html | grep public_html | tr -d '\n'
straight from the command line it works. i've tried changing ls to /bin/ls and it still doesn't work. has anyone got any ideas what the problem is? this was working before and the same script works on my other server so i 'm not sure what the problem is. any advice appreciated.
thanks in advance
roland
i've got a script that for some reason is giving the error:
sh: /ls: No such file or directory
and yet ls works if i run from the command line in ssh but running the very same line from the script gives this error.
the line that's causing the error is:
$list=exec("ls /home/*/domains/*/public_html | grep public_html | tr -d '\n'");
and yet if i run:
ls /home/*/domains/*/public_html | grep public_html | tr -d '\n'
straight from the command line it works. i've tried changing ls to /bin/ls and it still doesn't work. has anyone got any ideas what the problem is? this was working before and the same script works on my other server so i 'm not sure what the problem is. any advice appreciated.
thanks in advance
roland