Error applying CSF recommendations for PHP
Hi,
On a [ CENTOS 7.3 x86_64 kvm " srv4 WHM 62.0 ] system, CSF recommends to:
when trying to add the line using the MultiPHP INI Editor to the correct php version in cpanel I get :
the line I'm adding is as simple as :
Any tips? Many thanks
You should modify the PHP configuration and disable commonly abused php functions, e.g.:
disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_openwhen trying to add the line using the MultiPHP INI Editor to the correct php version in cpanel I get :
API failure: (XID d2pscd) 1 error occurred: Error #1: The php.ini file contains an invalid line: "disable_functions".the line I'm adding is as simple as :
disable_functions = show_sourceAny tips? Many thanks
-
Leave off the title, its in the file where you add it already. Find this: disable_functions = Change it to this: disable_functions = show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open 0 -
Just to add, if you're not using multiple versions of PHP, say you're just interested in using 5.6 only, you can disable the other versions in EasyApache. That way you're only adding that line once. (which solves the alerts in CSF Server Check) 0 -
Thanks for the second tip. Will take care of it. As for the issue of this post, at first I was only adding "show_source, system, shell_exec, passthru, exec, phpinfo, popen, proc_open" since the start of the line "disable_functions =" was already there. I followed your advice and now all works like a charm.. Thanks anyway, case solved 0 -
Happy to help. :) 0
Please sign in to leave a comment.
Comments
4 comments