Home  >  Article  >  Backend Development  >  How to turn off php safe mode?

How to turn off php safe mode?

coldplay.xixi
coldplay.xixiOriginal
2020-07-13 14:38:062289browse

How to turn off php safe mode: first edit the [php.ini] file and search for [safe_mode]; then change [safe_mode = On] to [safe_mode = Off]; finally save and restart apache .

How to turn off php safe mode?

How to turn off php safe mode:

php safe mode: safe_mode=on|off

Enabling the safe_mode directive will restrict language features that may be dangerous when using PHP in a shared environment. You can set safe_mode to a Boolean value on to enable it, or

to off to disable it. It compares the UID (user ID) of the executing script with the UID of the file the script is trying to access as the basis for the restriction mechanism. If the UIDs are the same, the script

is executed; otherwise, the script fails.

Specific steps:

1. Edit the php.ini file and look for safe_mode;

2. If you see safe_mode = On, then change it to safe_mode = Off

3. Save and restart apache and it will be ok.

Related learning recommendations: PHP programming from entry to proficiency

The above is the detailed content of How to turn off php safe mode?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Related articles

See more