[BlueOnyx:05982] Re: safe_mode

Michael Stauber mstauber at blueonyx.it
Thu Dec 2 08:39:47 -05 2010


Hi User Ernie,

> I am having a problem with the ImageMagick convert program when it's called
> from a php script: The error message is:
> 
> 
> PHP Warning:  exec() has been disabled for security reasons in
> /home/.sites/70/site4/web/......
> 
> I did a bit of searching and the finger points at the safe_mode flag in
> php.ini.

In the GUI go to "Server Management" / "Security" / "PHP Settings". There 
you'll find the global PHP settings for all sites.

There is a line called "Disable functions". It shows which PHP functions have 
been turned off and are not allowed to be used by any scripts. This is 
regardless of safe_mode, so it doesn't matter if safe_mode is on or off.

By default the following functions are disabled:

system
passthru
shell_exec
shell
proc_open
proc_nice
ini_restore

Reason: They're potentially dangerous and are often used for exploits. If you 
want to allow exec, remove "exec" and "shell_exec" from that list and save the 
changes. But that potentially opens a can of worms ...

-- 
With best regards

Michael Stauber



More information about the Blueonyx mailing list