• Resolved abuzon

    (@abuzon)


    I couldn’t find mention of this anywhere on the internet.
    I got this error doing manual configuration of the Web Application Firewall. After entering the path to wordfence-waf.php and checking off “all sub-directories” and saving. Using Siteground cPanel.

    PHP Variables Manager
    The following errors were encountered while processing your request:
    OneHphpvar::saveini failed: Invalid value for variable auto_prepend_file ignored.

    The following changes were stored to /public_html/php.ini :
    zend_extension=/usr/local/php70/lib/php/extensions/ioncube.so
    zend_extension=/usr/local/php70/lib/php/extensions/ZendOptimizer.so

    I see the waf.php file in my FTP, my php.ini just has the 2 lines shown above, and all that’s in my .htaccess is
    “# Wordfence WAF
    # END Wordfence WAF”

    Not sure if it installed correctly or not?

Viewing 4 replies - 1 through 4 (of 4 total)
  • Hello @abuzon

    Ivan Atanasov from SiteGround here. I decided to post a reply here to let you know that if there is no line in your php.ini file for the auto_prepend_file variable – the WordFence setup is expected to fail.

    It looks like you are including a wrong auto_prepend_file variable. Please test again with the absolute path to the wordfence-waf.php file.

    If this does not work, you can start the process from the beginning and follow the steps described here: https://www.wordfence.com/help/firewall/optimizing-the-firewall/#alternative-setups

    Please update this discussion should you face further difficulties. You can also share the website where you are facing these issues.

    Thread Starter abuzon

    (@abuzon)

    Thank you @ivanatanasov! Yet more proof that Siteground customer service is AMAZING!
    I wanted to post this publicly since there’s no mention of this error (or solution) anywhere online and want to have a resource out there for others (statistically improbable that I’m the ONLY one, ever).
    Those are the same instructions I had used. I had done this on other sites without issue.
    Since there were a few lines added in php.ini, should I follow Wordfence’s removal instructions and try again? Or just try doing it again, leaving what’s there?
    Thank you again, Ivan!

    @abuzon,

    I believe it will be easier if you start the process from the beginning. The two lines are includes for the ioncube.so and ZendOptimizer.so extensions and should be added in your php.ini file while you are configuring it from cPanel.

    Also, thank you for the kind comment ??

    Thread Starter abuzon

    (@abuzon)

    Alright, I think I figured out what I did wrong!
    I wanted to document it here in case someone else does the same goof. Instead of entering just the path (/home/…) for the wordfence-waf.php file in Step 6, I copied and pasted the entire line from Wordfence popup (auto_prepend_file = ‘/home/…)

    The message you’ll get when you do it correctly is:

    The following changes were stored to /home/…/public_html/php.ini :

    auto_prepend_file = “/home/…/public_html/wordfence-waf.php”
    zend_extension=/usr/local/php70/lib/php/extensions/ioncube.so
    zend_extension=/usr/local/php70/lib/php/extensions/ZendOptimizer.so

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Manual Firewall Config – OneHphpvar error’ is closed to new replies.