PDA

View Full Version : Wordfence-waf.php hosing my forum


Big Kahuna
11-24-2016, 06:50 PM
Wordfence and wordfence-waf.php

I use to have a Wordpress install on the MoparStyle site, but uninstalled and deleted when I upgraded to VB5. I had the Wordfence plugin installed.

That plugin installed a .user.ini, a wordfence-waf.php and modified my .htacess

i created a new .htaccess to redirect the sites root (formerly the Wordpress install) that has no reference to Wordfence.

RewriteEngine on
RewriteCond %{HTTP_HOST} ^(www.)?moparstyle.com$
RewriteCond %{REQUEST_URI} !^/forums/articles
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /forums/articles$1
RewriteCond %{HTTP_HOST} ^(www.)?moparstyle.com$
RewriteRule ^(/)?$ forums/articles [L]
#RewriteRule ^/?classifiedads/(.*)$ http://www.moparstyle.com/forums/forum/mopar-classified-ads$1 [R=301,L]
RedirectMatch 301 ^/classifiedads(.*)$ http://www.moparstyle.com/forums/forum/mopar-classified-ads


However, if I remove the ini or php file every url in domain gets me an Error 500 page. I'm figuring it must have an entry in the php.ini file, but I can't figure out how to access and modify with the limited Cpanel I have with O Addy hare hosting.

the .user.ini

; Wordfence WAF
auto_prepend_file = '/home/moparstyle/public_html/wordfence-waf.php'
; END Wordfence WAF


anyone know where I can find the php.ini file on shared hosting? There's no cPanel access, and I can't find it in my hosting'd php directory. I tried to change my php version, but that doesn't reset to a default php.ini

Dave
11-24-2016, 08:21 PM
500 errors should be logged in the error log with detailed information on why it's causing the error, take a look at that.

You can find the .ini location by going to your php info page in vbulletin.

Big Kahuna
11-24-2016, 11:01 PM
thanks

--------------- Added 1480036724 at 1480036724 ---------------

it says that the directory with the file is located at /opt/alt/php56/etc/php.ini

I cannot find an opt directory, as deep as I can go. I'm wondering if it is one directory below the access I have on a shared server

I did however see in the php info where my problem is

auto_prepend_file /home/moparstyle/public_html/wordfence-waf.php

Now if I could only get there to change it

Dave
11-25-2016, 01:05 AM
Yes, you often do not have access to such files/folders on shared servers.

Big Kahuna
11-27-2016, 01:02 AM
Ok figured this out. The .user.ini was appending to the shared servers php.ini. While deleting both right away hose the site, if I deleted the .user.ini first and then the wordfence-waf.php about twenty minutes later all was well.

I hope this helps anyone else having this problem in the future.

Thanks