Y
Y
Yuri Kalnin2018-09-07 07:43:01
PHP
Yuri Kalnin, 2018-09-07 07:43:01

How to disable eval function, disable_functions does not work in php.ini?

Changed the parameters in php.ini disable_functions
restarted the server.
in the info.php file I write the following code:

<?php
eval('echo 5+10;');
echo "<br>";
echo ini_get('disable_functions');
?>

on the screen I see:
exec,eval,proc_open,shell_exec,system,passthru

15

as you can see, eval is on the list of prohibited functions, but it works!!!!!! I don't understand....

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2018-09-07
@Rsa97

eval is not a function but a language construct and cannot be disabled via disable_functions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question