DJAx3L Posted September 12, 2006 Report Posted September 12, 2006 (edited) PHP shells are a big threat to servers, as many hackers use them to run commands on a server. In this tutorial you will find out how to turn the safe mode on, because it restricts and disables the dangerous functions in PHP from the scripts like PHP Shell that can cause damage to your server.Things you have to do before you start:1.] Make a backup of php.ini [ just incase ]2.] Find the path to php.ini3.] Login root account in your shellLet's start:1.] Open "php.ini" in pico editor.[ pico /usr/local/lib/php.ini ]2.] Find "safe_mode".[ Ctrl + W and type "safe_mode" ]3.] Change:[ "safe_mode = Off" to "safe_mode = On" ]4.] Find "disabled_functions".[ Ctrl + W and type "disabled_functions" ]5.] Add the following functions:[ system, exec, shell_exec, passthru, pcntl_exec, putenv, proc_close, proc_get_status, proc_nice, proc_open, proc_terminate, popen, pclose, set_time_limit, ini_alter, virtual, openlog, escapeshellcmd, escapeshellarg, dl, curl_exec, parse_ini_file, show_source ]6.] Save the file.[ Ctrl + X then Y ]7.] Restart Apache web server.[ /etc/init.d/httpd restart ] Edited November 17, 2009 by wvw Quote