Title: php.ini problem
Last modified: August 31, 2016

---

# php.ini problem

 *  [FunkyLee](https://wordpress.org/support/users/funkycreep/)
 * (@funkycreep)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/)
 * Hi, i’m trying to install the waf but is locked on:
 * >We’ve preselected your server configuration based on our tests, but if you know
   your web server’s configuration, please select it now.
 * >Apache + mod_php (recommended based on our tests)> Continue
 * Alternate method:
    We’ve also included instructions to manually perform the change
   if you are using a web server other than what is listed in the drop-down, or 
   if file permissions prevent this change.
 * You will need to append the following code to your php.ini:
 * auto_prepend_file = ‘/home/username/website.com/wordfence-waf.php’
 * how can i solve it?
 * i’m using a shared hosting with multisite addon domain
 * i’ve try to disable on primary wp site (public_html) but not help me to configure
   the second wp site (website.com), even opposite nothing work.
 * wp 4.4.2 Wordfence6.1.2
 * [https://wordpress.org/plugins/wordfence/](https://wordpress.org/plugins/wordfence/)

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/phpini-problem-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/phpini-problem-1/page/2/?output_format=md)

 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266200)
 * Hi,
 * Did the installation work correctly for you on the primary site that you mentioned,
   but only not on the subdirectory site?
 * Also, when you attempt the installation on the second site, does go through the
   steps as if it is working, but just does not take effect? Or does it not let 
   you continue past the first page?
 * -Matt R
 *  Thread Starter [FunkyLee](https://wordpress.org/support/users/funkycreep/)
 * (@funkycreep)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266202)
 * no, it didn’t work on both. i try to disable the plugin on the first to give 
   a try at the second wp but didn’t work, the same when i disable it at the second
   wp.
 * in none of them it goes on, after i give ok for the second step and it asks to
   save htaccess, i did it and after that back to the first step without making 
   a change.
 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266215)
 * Ok. Can you find any messages in the error logs for either site?
 * -Matt R
 *  Thread Starter [FunkyLee](https://wordpress.org/support/users/funkycreep/)
 * (@funkycreep)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266228)
 * i didn’t find any error log, but it comes this info when i turn back to first
   step after saving htaccess:
 * The changes have not yet taken effect. If you are using LiteSpeed as your web
   server or CGI/FastCGI interface, you may need to wait a few minutes for the changes
   to take effect since the configuration files are sometimes cached. You also may
   need to select a different server configuration in order to complete this step,
   but wait for a few minutes before trying. You can try refreshing this page.
 *  Plugin Author [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * (@wfmattr)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266271)
 * It sounds like the host may not support the method we are using to load the new
   firewall. Can you tell me what hosting company you are using?
 * You might be able to complete setup manually following the steps in this section:
   
   [ SiteGround and other hosts without .user.ini support](https://docs.wordfence.com/en/Web_Application_Firewall_Setup#SiteGround_and_other_hosts_without_.user.ini_support)
 * We’re looking at automating this in a future version, for any hosts where we 
   need to use alternate methods. If it works for you, let me know.
 * -Matt R
 *  [DavidLum](https://wordpress.org/support/users/davidlum/)
 * (@davidlum)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266295)
 * Also does not work on a Bluehost hosted sub site. Same sequence of events that
   FunkyCreep experienced.
 *  [mnorth](https://wordpress.org/support/users/mnorth/)
 * (@mnorth)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266299)
 * I’m having no end of issues as well.
 * I’ve checked the .user.ini file and php.ini file, and the required code is apparently
   there, but the setup simply doesn’t work.
 * I’m using an Australia host, Netregistry, using Lightspeed. I don’t have cPanel,
   so I’m accessing the files directly using Dreamweaver.
 * Also, is there any security risk if the Wordfence Web Application Firewall is
   not enabled? Are other aspects of Wordfence suspended or affected?
 *  Thread Starter [FunkyLee](https://wordpress.org/support/users/funkycreep/)
 * (@funkycreep)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266315)
 * my host is netsons.com
 * the solution for siteground do not work for my host (maybemy account is locked
   from this option), even if i try to create a php.ini for each site.
 *  [pierrer](https://wordpress.org/support/users/pierrer/)
 * (@pierrer)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266324)
 * I had similar problems running apache2 with mod_php. Using a custom php.ini with
   the SetEnv PHPRC directive in .htaccess didn’t work.
    The wordfence-waf.php file
   was created (after changing the permissions) so I just added:
 *     ```
       php_value auto_prepend_file "/path_to_file/wordfence-waf.php"
       ```
   
 * in my .htaccess and the firewall is loaded.
    Is this solution viable?
 *  [mnorth](https://wordpress.org/support/users/mnorth/)
 * (@mnorth)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266364)
 * Where in the .htaccess did you add the code? I’m not that familiar with coding,
   so not sure of the best location.
 *  [pierrer](https://wordpress.org/support/users/pierrer/)
 * (@pierrer)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266375)
 * Just add it to the end of the file. Just be careful to not put it in between 
   any # …. # blocks because this is code added by a plugin or WordPress which can
   be changed or removed.
    And make sure you run apache2 with mod_php before adding
   this!
 *  [mnorth](https://wordpress.org/support/users/mnorth/)
 * (@mnorth)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266377)
 * OK, thanks. I’ll hold off doing anything for now and see what happens when the
   week of WAF ‘learning’ is over and whether everything works out. And it looks
   like other things are afoot as well, following the ‘positive’ responses to the
   latest upgrade. 😉
 *  [russelyeti](https://wordpress.org/support/users/russelyeti/)
 * (@russelyeti)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266379)
 * Hi,
 * The support team of my hosting company confirms that they use Apache/suPHP but
   on shared hosting they do not support .user.ini, neither changes to php variables
   or custom php.ini.
 * So the guided setup is not completing successfully and the alternative solutions
   proposed in the official WAF wiki page are not working.
 * I tried the solution proposed by pierrer:
    just add `php_value auto_prepend_file"/
   path_to_file/wordfence-waf.php"` at the end of .htaccess, and it works.
 * @ WFMattR: like pierrer I’m wondering if this is a good solution, it works but
   it seems to bee too easy/basic that make me think I’m missing something :). Can
   you confirm and or explain better?
 * Thanks!
 *  [mnorth](https://wordpress.org/support/users/mnorth/)
 * (@mnorth)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266380)
 * I tried that and it didn’t work.
 *  [pierrer](https://wordpress.org/support/users/pierrer/)
 * (@pierrer)
 * [10 years, 1 month ago](https://wordpress.org/support/topic/phpini-problem-1/#post-7266389)
 * Are you sure you use mod_php? See [here ](http://stackoverflow.com/questions/16414054/find-out-how-php-is-running-on-server-cgi-or-fastcgi-or-mod-php)
   how to determine.

Viewing 15 replies - 1 through 15 (of 22 total)

1 [2](https://wordpress.org/support/topic/phpini-problem-1/page/2/?output_format=md)
[→](https://wordpress.org/support/topic/phpini-problem-1/page/2/?output_format=md)

The topic ‘php.ini problem’ is closed to new replies.

 * ![](https://ps.w.org/wordfence/assets/icon.svg?rev=2070865)
 * [Wordfence Security - Firewall, Malware Scan, and Login Security](https://wordpress.org/plugins/wordfence/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordfence/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordfence/)
 * [Active Topics](https://wordpress.org/support/plugin/wordfence/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordfence/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordfence/reviews/)

 * 22 replies
 * 9 participants
 * Last reply from: [WFMattR](https://wordpress.org/support/users/wfmattr/)
 * Last activity: [10 years ago](https://wordpress.org/support/topic/phpini-problem-1/page/2/#post-7266461)
 * Status: not resolved