AlexisMeroni

Active Member
Feb 9, 2013
36
0
6
cPanel Access Level
Root Administrator
Hello !
On global php.ini i have change for security reasons :

PHP:
 magic_quotes = On
safe_mode = On
expose_php = Off
Enable_dl = Off
register_globals = off
display_errors = off
disable_functions = system, show_source, symlink, exec, dl, shell_exec, passthru, phpinfo, escapeshellarg, escapeshellcmd, ini_set, popen, proc_open, allow_url_fopen
But if a account create a php.ini file on /public_html with
PHP:
safe_mode = On
there functions are reactivated.
I do not know what to do to secure my cPanel maximum.
Thank you in advance for your help
 

quietFinn

Well-Known Member
Feb 4, 2006
1,894
464
438
Finland
cPanel Access Level
Root Administrator
Seems you use suPHP.

You must edit file /opt/suphp/etc/suphp.conf
and find these lines:

Code:
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
;application/x-httpd-php=/usr/local/lib/  
;application/x-httpd-php4=/usr/local/php4/lib/  
;application/x-httpd-php5=/usr/local/lib/
and change them to be like this:

Code:
[phprc_paths]
;Uncommenting these will force all requests to that handler to use the php.ini
;in the specified directory regardless of suPHP_ConfigPath settings.
application/x-httpd-php=/usr/local/lib/  
application/x-httpd-php4=/usr/local/php4/lib/  
application/x-httpd-php5=/usr/local/lib/
 
  • Like
Reactions: cPanelJamyn

quietFinn

Well-Known Member
Feb 4, 2006
1,894
464
438
Finland
cPanel Access Level
Root Administrator
The subject of this thread is "Block php.ini on accounts", and seems that you got your answer.
If you have other questions you must post another thread.