Cannot execute shell_exec function
Hello,
I have a linux server where cPanel is installed. I cannot call shell_exec function from PHP in that server. I have another server where cPanel is not installed there i can call shell_exec function.
Can anyone please tell me what is the difference in cPanel server. What changes I need to make to execute that function using PHP.
Thanks
-
edit /usr/local/lib/php.ini and remove shell_exec from the disable functions line 0 -
Hello :) Yes, as mentioned, check to see if it exists under the disable_functions entry in your /usr/local/lib/php.ini file. Thank you. 0 -
Or you can sign in to WHM -> PHP Configuration Editor - > click on advanced mode Now you can easy search and delete that line. 0 -
@Fral-IT, By default cpanel server was disable all php vulnerability functions that's why you are facing the issue. You need to remove "shell_exec" function from "disable functions" line that's it. You can done this by using above two methods which one is familiar for you....got it...) 0
Please sign in to leave a comment.
Comments
4 comments