Title: PHP Warning: ini_set()
Last modified: June 24, 2021

---

# PHP Warning: ini_set()

 *  Resolved [davi8r](https://wordpress.org/support/users/davi8r/)
 * (@davi8r)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-ini_set-2/)
 * Hello gVectors,
 * We added some measures to harden our server security. Among these, we disabled
   ini_set (PHP 7.4). This seems to be the only measure that resulted in error logging.
   Our WP error_log began filling with these messages:
 * [23-Jun-2021 15:46:37 UTC] PHP Warning: ini_set() has been disabled for security
   reasons in ../public_html/wp-content/plugins/wpforo/wpforo.php on line 385
    [
   23-Jun-2021 15:46:37 UTC] PHP Warning: ini_set() has been disabled for security
   reasons in ../public_html/wp-includes/functions.php on line 7005 and [23-Jun-
   2021 15:51:04 UTC] PHP Warning: ini_set() has been disabled for security reasons
   in ../public_html/wp-content/plugins/wpforo/wpf-includes/functions.php on line
   742
 * Simultaneously, we noticed a spinning “working” image in the Leave a reply editor
   box under forum posts viewed by logged-in users.
 * As a temporary measure, we re-enabled ini_set and the error logging ceased. However
   the spinning image persists in the Leave a reply box. I posted a test reply (
   ignoring the spinning wheel in the editor box), which worked. I tested this in
   Mozilla/Linux, Chrome/Win10 and Chrome/iPad. Consistent behavior across all three.
 * A Linux tech at our ISP suggested that if we know what ini_set is trying to set,
   we could add the configuration to .user.ini. Can you suggest a workaround we 
   might try to allow us to disable ini_set without flooding the error_log with 
   PHP Warnings? Also, what determines when to display the spinning image in the
   reply editor? If I know what triggers it, such as an api call to Akismet, I can
   try to figure out what is being blocked or check to see if another PHP Function
   required by wpforo has been disabled.
 * Thank you,
    — Dave
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fphp-warning-ini_set-2%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Author [gVectors Team](https://wordpress.org/support/users/gvectors-team/)
 * (@gvectors-team)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-ini_set-2/#post-14598151)
 * Hi [@davi8r](https://wordpress.org/support/users/davi8r/),
    The ini_set() function
   is used by many plugins. You’ll have lots of issues with other plugins and themes
   in the future. This function is used for many configurations. We cannot disable
   this function. You can edit the following two files:
 *     ```
       wp-content/plugins/wpforo/wpf-includes/functions.php
       /wp-content/plugins/wpforo/wpforo.php
       ```
   
 * Find this line:
 * `ini_set( 'date.timezone', 'UTC' );`
 * and change it to this:
 * `//ini_set( 'date.timezone', 'UTC' );`
 * However, this should be done after each update.
    BTW, one of the error maker 
   is located in the WordPress core files. So you should edit WordPress files as
   well.
    -  This reply was modified 4 years, 11 months ago by [gVectors Team](https://wordpress.org/support/users/gvectors-team/).
 *  Thread Starter [davi8r](https://wordpress.org/support/users/davi8r/)
 * (@davi8r)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-ini_set-2/#post-14601355)
 * Hello [@gvectors-team](https://wordpress.org/support/users/gvectors-team/),
 * Thank you for your reply and the information provided. I am discussing with our
   ISP and will let you know what we decide.
 * Regards,
    _ — Dave_
 *  Thread Starter [davi8r](https://wordpress.org/support/users/davi8r/)
 * (@davi8r)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-ini_set-2/#post-14648803)
 * Hello [@gvectors-team](https://wordpress.org/support/users/gvectors-team/)
 * I experimented with commenting out the ini_set function calls that I knew about
   but, on testing, discovered lots of other errors as the site ran.
 * So we’re in agreement: WordPress doesn’t run very well without ini_set so I’ve
   re-enabled the function.
 * Thank you for the support you provided while I looked into this!
 *  — Dave

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘PHP Warning: ini_set()’ is closed to new replies.

 * ![](https://ps.w.org/wpforo/assets/icon-256x256.png?rev=2121644)
 * [wpForo Forum](https://wordpress.org/plugins/wpforo/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wpforo/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wpforo/)
 * [Active Topics](https://wordpress.org/support/plugin/wpforo/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wpforo/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wpforo/reviews/)

## Tags

 * [ini_set](https://wordpress.org/support/topic-tag/ini_set/)
 * [PHP Warning](https://wordpress.org/support/topic-tag/php-warning/)

 * 3 replies
 * 2 participants
 * Last reply from: [davi8r](https://wordpress.org/support/users/davi8r/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/php-warning-ini_set-2/#post-14648803)
 * Status: resolved