shell_exec(): Cannot execute using backquotes in Safe Mode (just if from commandline)


Feb 16, 2009
Everything was ok before a small update (apache+php), but now I get this strange problem with php as shell script.

this is my test.php (safe_mode is off and already tried with custom php.ini)
#!/usr/local/bin/php -n
echo shell_exec("uptime");
Warning: shell_exec(): Cannot execute using backquotes in Safe Mode in

Server Version: Apache/2.2.11 (Unix) mod_ssl/2.2.11 OpenSSL/0.9.7a  mod_bwlimited/1.4

# php -v
PHP 5.2.8 (cli) (built: Feb 16 2009 16:18:58)
Copyright (c) 1997-2008 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2008 Zend Technologies
    with Zend Extension Manager v1.2.2, Copyright (c) 2003-2007, by Zend Technologies
    with Suhosin v0.9.27, Copyright (c) 2007, by SektionEins GmbH
    with Zend Optimizer v3.3.3, Copyright (c) 1998-2007, by Zend Technologies

# uname -a
Linux 2.6.9-55.0.2.ELsmp #1 SMP Tue Jun 12 17:58:20 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

cPanel 11.24.4-S33345 - WHM 11.24.2 - X 3.9
REDHAT Enterprise 4 x86_64 on standard
+ suphp, mod_security, suhosin. basedir_restriction

An other strange thing:

I get this error when I run that script as shell:
# /root/bin/test.php

But it is running normal when I execute with php command:
# php -f ./root/bin/test.php -c /root/bin/php.ini