ini_set(): Headers already sent. You cannot change the session module’s ini settings at this time

Home Forums BulletProof Security Pro ini_set(): Headers already sent. You cannot change the session module’s ini settings at this time

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #41116
    GR
    Participant

    Hello,

    I’ve modified our WordPress site from initial testing phase to final release. Now with final release I’m getting the following in PHP Error Log:

    PHP Warning: ini_set(): Headers already sent. You cannot change the session module’s ini settings at this time in /var/www/html/wp-config.php on line 66

    I’ve cleared the error log but this keeps coming up and lots of it. I’m not sure what I need to do to clear this for good. Can someone show me how I can clear this error?

    Steps I took to convert from test phase to final release are the following:

    1. Took a backup of test site mysql file
    2. Modified mysql backup file and replaced test with www
    3. Dropped test sql database and created final sql database file
    4. Imported updated sql backup file to final sql database
    5. Restarted WordPress and the PHP Warnings started to show up.

    Thank you,

    Gary

    #41117
    AITpro Admin
    Keymaster

    I am aware of the BPS ini_set php errors in the wp-config.php file.  To fix this issue do the steps below. This will also be changed/fixed in the next BPS Pro version.

    Edit these 3 BPS ini_set lines of code in your wp-config.php file and add an @ symbol in front of these 2 lines of code as shown below.  If/when AutoRestore|Quarantine quarantines your wp-config.php file then restore the wp-config.php file from Quarantine.

    @ini_set('session.cookie_httponly','On');
    @ini_set('session.use_only_cookies','On');
    @ini_set('session.cookie_secure','Off');
    #41118
    GR
    Participant

    I’ve added @ symbol in front of all three lines as you’ve indicated and that seems to have rectified the error I was getting.

    Thank you!
    Gary

    #41475
    Grant
    Participant

    Hello,

    Just to say that I have updated to Bullet Proof Security Pro V16.2 but I’m still experiencing this PHP error.

    #41477
    AITpro Admin
    Keymaster

    @ Grant – This should have been automatically fixed when upgrading to 16.2.  Try resaving your BPS Pro > PHP Options > ini_set Options settings.  If that does not work then manually edit your wp-config.php file and add the @ symbols.

    #41478
    Grant
    Participant

    You’re right, thanks!

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.