Hi,
It seems that whenever I use system commands in PHP, it does not work. Such as: shellexec, passthru, mkdir, etc? Is there some setting I need to change for my server? How can I tell?
Thanks a lot.
Well what error are you getting? More than likely safe_mode is enabled.
I don't get any error messages. Just that I know system call is not executed that's all.
For exmaple, I do a mkdir($mydir), and I check the server, the directory is not created.
How do I tell if safe mode is on?
TIA
Use [man]phpinfo()[/man]. Safe mode option is somewhere in Configuration>PHP Core table.
wilku wrote:Use [man]phpinfo()[/man]. Safe mode option is somewhere in Configuration>PHP Core table.
Thanks wilku, I try phpinfo().
here is some output from phpinfo(): safe_mode Off Off safe_mode_exec_dir no value no value safe_mode_gid Off Off safe_mode_include_dir no value no value
How come my safe_mode is off and still can't do it.
I think there must be an error somewhere, but for some reason, it's not displayed. - try putting error_reporting(E_ALL); at the very beginning of your script - if the error's still not showing, look at your webserver's error log - maybe the errors are reported there. If not, I give up ;-)
wilku wrote:I think there must be an error somewhere, but for some reason, it's not displayed. - try putting error_reporting(E_ALL); at the very beginning of your script - if the error's still not showing, look at your webserver's error log - maybe the errors are reported there. If not, I give up ;-)
Thanks a lot. I know what the problem is now. It turns out that I did not set the proper permission on the directory which I want to execute system call.
BTW,
How do you mark the thread resolve?