• Resolved Corl

    (@corl)


    Hi, I switched to a host with Cloudlinux servers that don’t support a php.ini file where I’m used to setting this directive:

    auto_prepend_file = ‘/xxxxx.com/public_html/wordfence-waf.php’
    ; Load Wordfence firewall first

    They have instead a section called PHP Selector > PHP Options > auto_prepend_file with a form to place the file path. Their support was unsure if the file path should be
    single quoted ‘/xxxxx.com/public_html/wordfence-waf.php’
    double quoted “/xxxxx.com/public_html/wordfence-waf.php”
    or no quotes /xxxxx.com/public_html/wordfence-waf.php

    Your help is greatly appreciated.

    Cheers,
    Corl

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @corl , Thank you for reaching out.

    The file path should work with no quotes around it. That is assuming you are using an interface on the host panel which it sounds like that is what they are using.

    When you set the auto_prepend_file, wait about 5 minutes and then check Wordfence > Firewall > Manage WAF and see if the firewall is optimized.

    If you want me to check it you can send me a diagnostic and I can check if it is optimized. You can send the diagnostic report to wftest @ wordfence . com. You can find the link to do so at the top of the Wordfence > Tools > Diagnostics page. Then click on “Send Report by Email”. Please add your forum username where indicated and respond here after you have sent it.

    NOTE: It should look as follows – Screenshot of Tools > Diagnostic > Send by Email

    Let me know if this helped, thanks again!

    Christian

    Thread Starter Corl

    (@corl)

    Hi Christian,

    No quotes is the way to go. The WAF looks good at “55% Web Application Firewall, Currently in Learning Mode.” I checked the Diagnostics page, which shows that the WAF auto prepend active: Yes.

    Thank you so much,
    Corl

    Hello @corl , Glad I could help!

    I recommend putting the Web Application Firewall Status at Enabled and Protecting instead of learning mode for the best security. Learning mode is mostly used if Wordfence and another plugin have a conflict and you are seeing a lot of false positives.

    Thank you,

    Christian

    Thread Starter Corl

    (@corl)

    Hey Christian,

    Thanks for the great tip! I’ll do that now and with the other sites I’m setting up.

    Cheers,
    Corl

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘PHP Options, auto_prepend_file’ is closed to new replies.