3

I put this in the php.ini file:

disable_functions="popen,exec,system,passthru,proc_open,shell_exec,show_source,phpinfo"

But I can still call them (tested exec and shell_exec. I have restarted the webserver several times.

(under windows).

5
  • 1
    the best way to see the actual php.ini settings in effect, is to call phpinfo() and see what has been set Commented May 28, 2013 at 18:40
  • it says "no value", I don't get it Commented May 28, 2013 at 18:48
  • 1
    check under the "loaded php.ini file", if it's the same path you have actually changed Commented May 28, 2013 at 18:48
  • I can turn safe mode on and off with that php.ini. Yes its the correct path. Commented May 28, 2013 at 18:51
  • 3
    try removing the double quotes, leaving the comma-separated list Commented May 28, 2013 at 18:53

1 Answer 1

8

Try removing the double quotes:

disable_functions=popen,exec,system,passthru,proc_open,shell_exec,show_source,phpinfo
Sign up to request clarification or add additional context in comments.

2 Comments

it's pretty hilarious that this answer is exactly the opposite of stackoverflow.com/questions/24387209/…
@anarcat nevertheless, this is the correct answer, see php.net/manual/en/ini.sect.safe-mode.php for an example

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.