Apr 23 2014 
Support Center » Knowledgebase » Linux VPS » How do I disable PHP functions to help prevent exploits?
 How do I disable PHP functions to help prevent exploits?
Solution 1. Login to server as root and locate php.ini file.

locate php.ini

( For cPanel server path is /usr/local/lib/php.ini and for most of other control panels its /etc/php.ini )

2. Edit the file using following command.

vi /usr/local/lib/php.ini

3. Scroll down until you see "disabled_functions" ;.

4. Go ahead and comment the line out with a ";" and replace it with the following:

disable_functions = "exec,system,passthru,readfile,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,popen,parse_ini_file,show_source,curl_exec"

5. Save the settings and restart apache service for changes to take effect.


Article Details
Article ID: 185
Created On: Feb 06 2009 03:07 PM

 This answer was helpful  This answer was not helpful

 Back
 Login [Lost Password] 
Email:
Password:
Remember Me:
 
 Search
 Article Options
Home | Register | Knowledgebase
Language:

Help Desk Software By Kayako eSupport v3.60.02