Support » Plugin: HTTP Headers » Syntax error, unexpected ‘(‘ in /public_html/.user.ini on line 6

  • Resolved KVNHNF

    (@kvnhnf)


    Hello,

    Siteground error logs shows numerous lines with the following:

    2020-06-28 04:41:37 UTC [apache][:error] [pid xxxxx] [client xxx] PHP: syntax error, unexpected ‘(‘ in /public_html/.user.ini on line 6, referrer: xxx

    This is caused by the following:

    # BEGIN HttpHeadersCookieSecurity
    # The directives (lines) between BEGIN HttpHeadersCookieSecurity and END HttpHeadersCookieSecurity are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    # END HttpHeadersCookieSecurity

Viewing 9 replies - 1 through 9 (of 9 total)
  • Is there any way to fix this? Thanks

    Plugin Author Dimitar Ivanov

    (@zinoui)

    The error seems strange to me, because the plugin store only the following settings into the .user.ini file:

    session.cookie_httponly = on
    session.cookie_secure = on
    session.cookie_samesite = "Lax"

    I mean there are no any “(” symbols.

    Can you post the content (along the error) of your .user.ini file here please?

    Hi Dimitar, thank you for your swift reply

    Isn’t it the very commenting there wich has “(lines)” that creates the error?

    Here is the content of my user.ini file:

    ; Wordfence WAF
    auto_prepend_file = ‘/home/customer/www/finelovedolls.com/public_html/wordfence-waf.php’
    ; END Wordfence WAF

    # BEGIN HttpHeadersCookieSecurity
    # The directives (lines) between BEGIN HttpHeadersCookieSecurity and END HttpHeadersCookieSecurity are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    # END HttpHeadersCookieSecurity

    Thanks

    Best regards

    Plugin Author Dimitar Ivanov

    (@zinoui)

    Oh, now I see.
    I’ll try to fix it as soon as possible.

    ok thank you

    hey just a quick reminder regarding the above, thanks

    KVNHNF

    (@kvnhnf)

    Hi Dimitar, can you tell me how to fix it until the update? thanks

    Plugin Author Dimitar Ivanov

    (@zinoui)

    Hi @kvnhnf

    I just released a new version (1.15.2) who fix this bug.

    Note that If your .user.ini file still contains # BEGIN…, # END…, or any other comments that starts with # symbol, you need to remove them manually (or replace the # with ; symbol).

    After updating the plugin, go to the Cookie Security page and save your settings again.

    Hi Dimitar, sorry for my late reply

    Updated the plugin, but the error keeps on showing.

    Haven’t enabled cookie security header so far, and did as you asked (saved it again with it being set to “off”)

    Also manually deleted this part from user.ini file:

    # BEGIN HttpHeadersCookieSecurity
    # The directives (lines) between BEGIN HttpHeadersCookieSecurity and END HttpHeadersCookieSecurity are
    # dynamically generated, and should only be modified via WordPress filters.
    # Any changes to the directives between these markers will be overwritten.
    # END HttpHeadersCookieSecurity

    Hopefully that did the trick

    Best regards

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