Use exec() function in server?

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
besa
Forum Newbie
Posts: 1
Joined: Thu Sep 27, 2007 7:43 am

Use exec() function in server?

Post by besa »

hello!

I'm actually having problems with using exec() function in PHP in the web server.
It seems that it doesn't execute any command at all.
For example when I use

exec("mkdir a");

in my local server everything it's OK.
But I can not do the same thing in the web server. It seems I don't have enough permissions
to do that.

Is there any way to get these permissions?

Thank you!
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

Likely, you have to switch the permissions so PHP can write and/or execute in the directory you are attempting to do this in, in your hosting provider's control panel .. or talk to them about it. There's mkdir(), just so you know.
Post Reply