php.ini > auto_prepend_file causes parse error
-
I am attempting to setup Wordfence WAF.
I have created wordfence-waf.php in the root of the WP installation, and set permissions to 775, in addition to chgrp to the web group.
I’m using host that allows for creation of an additional php.ini that is parsed in addition to the system php.ini, but does not allow exiting on system php.ini.
There doesn’t seem to be a problem reading the custom php.ini, but when applying it, I get a PHP parse error:
Parse error: syntax error, unexpected 'not' (T_STRING) in /home/public/wordfence-waf.php on line 3
.The auto_prepend_file directive is the only item in this custom php.ini:
$ cat php.ini auto_prepend_file = '/home/public/wordfence-waf.php'
Additionally, I tried adding the following to my WP root .htaccess and the warning message did not go away:
<IfModule lsapi_module> php_value auto_prepend_file '/home/public/wordfence-waf.php' </IfModule>
Using WordPress 4.6.1, Wordfence 6.2.2 and PHP 5.6.27.
- The topic ‘php.ini > auto_prepend_file causes parse error’ is closed to new replies.