简体   繁体   中英

Warning: ini_set() has been disabled for security reasons

How to solve like this problem at my server (Live server).

Warning: ini_set() has been disabled for security reasons in /home/blessin1/public_htm

If you have access to your php.ini file look for the disable_functions item and remove ini_set from the list. Depending on your server setup you may also need to restart Apache for this to take effect.

If you do not have access to php.ini you will need to ask your Sys Admin or hosting provider to make the change.

happened to one website recently, i solved it by changing from ea-php73 to alt-php74. big speed improvements too. Turns out the hosting's 7.3 default php setup has issues.

Sure, first option is remove ini_set from disable_functions as mentioned on @QuantumTiger answer.

Another way how I could solve it by adding Error Control Operators @ before function name where you use it. So replace ini_set() with @ini_set()

It's just an option how I could make it work from one of the packages in my personal case. But it could not be useful in case when using this function is critical.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM