Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I disable a function(s) from usage in PHP?

Tags:

php

I wanted to know the way to disable a function from usage in PHP.

Thanks

like image 487
user318466 Avatar asked Apr 19 '10 06:04

user318466


People also ask

How do I turn off eval?

NoEval extension disables window. eval() function on all webpages. It also disables similar approached to eval() when the input argument's type is String: 1. eval('sample code') 2.

What is Disable_functions?

The disable_function allows the server to disable certain functions to upscale the security of the server. PHP has a lot of functions which can be used to crack an application's server if they are not used properly.

What is the use of () when we Definine an function in PHP?

Return Value: This method returns a boolean value TRUE on success and FALSE on the failure of the expression. Example 1: In this example, we have created a constant namely GREETINGS and its value is Hello GFG and the name of the constant is case-insensitive by using define() function.

Which of the following PHP ini directives should be disabled to improve the security of you application?

INI settings Disable exec, shell_exec, system, popen and Other Functions To Improve Security.


1 Answers

In the php.ini configuration file, you can use the disable_functions parameter. For example, to disable the symlink() and system() functions, you would use:

disable_functions = "symlink,system"
like image 199
Dumb Guy Avatar answered Oct 20 '22 20:10

Dumb Guy