PHP exec()失败

I'm running wampserver and php5. exec() works when I run the script through the command-line, but when I try to run it through the server, it fails.

I looked at all the error logs, there were none. I redirected stderr to stdout, there was still no output when I run it from the server.

Any suggestions ?

EDIT: I should have mentioned -- I'm running on WinXP and safe_mode is off.

Perhaps you need to turn off safe_mode in php.ini (safe_mode = Off)

Can you post what exactly (code) you try to run?

Did you try this instead?

$return = system('dir');

Do you have a problem with the directories on the server maybe?

Just had the same problem. I don't whether this is a different case than yours or not.

I was trying to create new file(image) in a directory. Apparently the problem was on the folder permission. I used Linux Ubuntu.