Note that there are some explanatory texts on larger screens.

plurals
  1. POPHP: How To Disable Dangerous Functions
    primarykey
    data
    text
    <p>How can I disable the dangerous <strong>eval</strong> function? Can that be done using <strong>ini_set</strong> function?</p> <p>Also how to disable following functions? Can we disable them using <strong>ini_set</strong> function?</p> <pre><code>allow_url_fopen allow_url_include exec shell_exec system passthru popen stream_select </code></pre> <p><strong>eval</strong> is one of the most dangerous function that bad guys can use to exploit the things. There should be a mechanism to disable that without resorting to <strong>php.ini</strong> file; but is should be done programatically.</p> <p>Well, guys I am looking for an answers suggesting disabling of these dangerous lovely fellows without going to <strong>php.ini</strong> file; I mean how to disable them at runtime or programatically?</p> <p>Thanks in advance....</p> <p><strong>Update</strong></p> <p>Has anyone heard about PHP Shell Offender Script? It mainly used the eval function for the exploit. Hackers are able to run their PHP code on your site.</p> <p>My question was that I don't want to disable the eval function from php.ini file altogether. For example, i have developed my own MVC framework. Now the framework users can specify from frameworks config file whether eval (and others) function should be disabled or not. So this is left to the choice of framework users. Once they specify to disable it; i should be able to disable the eval function programatically.</p> <p>So that is the scenario. Looking for helpful answers/solutions.</p> <p>Thanks Again.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload