Click to See Complete Forum and Search --> : safe_mode and safe_mode_exec_dir


Anon
02-06-2001, 10:38 AM
Hi,

shouldn't it be possible to execute programms in (for example) "/usr/X11R6/bin/"
if safe_mode_exec_dir is set to the above ?

i tried:
shell_exec('/usr/X11R6/bin/convert');
and got the following error msg:
"Warning: Cannot execute using backquotes in safe mode in test.php"

So, how do i set a "trusted Directory" for executables in safe_mode ?
bye, Niko

vincente
02-08-2001, 04:55 AM
backtick execute is permanently disabled in safe mode:

-- quote the manual --

Note: The backtick operator is disabled when safe mode is enabled.

-- end quote --

It is a bit confusing because in the safe-mode section they indeed say that _all_ program execution functions can execute from the safe_mode_exec_dir in safe mode.

Anon
02-06-2002, 06:58 PM
So the only other options are ...

escapeshellcmd — escape shell metacharacters

exec — Execute an external program

passthru — Execute an external program and display raw output

system — Execute an external program and display output

...if I understand correctly.