how to disable eval php function

Nerigal

Verified User
Joined
Jul 6, 2009
Messages
124
Hi,

haven't found anything useful information regarding how to disable eval() under php.ini because it is a language construct.
but is there anyway to disable it or overwrite it without suphp ?

thanks
 
You disable it the same way you disable any other php function.
 
no it can NOT be disable simply by adding it in the php.ini function like disable_function = eval

regarding this http://ca.php.net/manual/en/function.eval.php

Caution

The eval() language construct is very dangerous because it allows execution of arbitrary PHP code. Its use thus is discouraged. If you have carefully verified that there is no other option than to use this construct, pay special attention not to pass any user provided data into it without properly validating it beforehand.
 
damn...had hope to be able to fake eval function with override_function so eval return null in php.ini or so
 
That might sound a little bit crazy, but what if you try to remove it from PHP source and re-compile PHP... not sure if it is possible or not, and how good is the idea.
 
Back
Top