• Resolved davi8r

    (@davi8r)


    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 to see the link]

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author gVectors Team

    (@gvectors-team)

    Hi @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 3 years, 9 months ago by gVectors Team.
    Thread Starter davi8r

    (@davi8r)

    Hello @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

    (@davi8r)

    Hello @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.