shell_exec command isnt working

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

shell_exec command isnt working

Post by pelegk2 »

i am trying to do :

Code: Select all

shel_exec('C:\\del peleg.kkk');
or

Code: Select all

shel_exec('C:\del peleg.kkk');
and i doesnt work! why?
malcolmboston
DevNet Resident
Posts: 1826
Joined: Tue Nov 18, 2003 1:09 pm
Location: Middlesbrough, UK

Post by malcolmboston »

for one you have a spelling mistake

this works

Code: Select all

shell_exec('/var/www/myscript');
Just a quick reminder for those trying to use shell_exec on a unix-type platform and can't seem to get it to work. PHP executes as the web user on the system (generally www for Apache), so you need to make sure that the web user has rights to whatever files or directories that you are trying to use in the shell_exec command. Other wise, it won't appear to be doing anything.
User avatar
pelegk2
Forum Regular
Posts: 633
Joined: Thu Nov 27, 2003 5:02 am
Location: Israel - the best place to live in after heaven
Contact:

Post by pelegk2 »

yes it s shell_exec
and its on windows 2000
i read somewhere that maybe the shell_exec command is disabled but i cant find where it is :(
Post Reply