May 24, 2004

And then it happens …

I’d tested the WP blacklist plugin quite extensively and it all seemed to work fine on my notebook machine and so I uploaded it yesterday and set it up for this site. And of course, I never tested the plugin on the site since it had worked before :p That is just asking for things to fail and fail they did – and most spectacularly too. Anybody who tried to post a comment probably got hit with a long string of PHP errors and not much else. Ainslie, who’d tried to post a comment earlier and couldn’t (due to a different error – this time due to me trying to set up permalinks with a nice directory structure :p) let me know about the problem and when I tried it, sure enough it wouldn’t work. So tried to fix it on the server itself for a bit. Bad idea! I finally simply turned off the blacklisting on the server and went back to my local machine. I could duplicate one of the PHP errors on the local machine and after a bit, I figured out what was wrong – there was a logical error in the code where I was checking for IP bans. If there were no IP addresses in the ban list (when I originally tested, there was of course an IP address entered for testing purposes), you get a PHP error. I fixed the code, tested on the local machine and it seemed fine. So I upload to the server and try again … another error! So I recreate the blacklist that I use on my local machine off Jay Allen’s blacklist file and try again and this time I get the error on the local machine too :p So I took a look at what was happening and it turns out that the blacklist that I’d originally imported off of had a few of the regular expressions modified so that they wouldn’t throw a fit with PHP. Unfortunately, when I pulled the list from Jay Allen’s site, I got the stuff as Jay Allen had them and PHP seemed to gag on that. I finally figured out how I should modify the fetched blacklist to play nice with PHP and ran through another round of testing and everything seemed to work fine. So back I went to the server with the blacklist and finally it all worked fine 🙂 Ah well, I’m glad that it works fine now – or at least it seems to … So I guess it’s time to add a few more plugins to the mix to see how soon things will break again :p

Tags: Coding, Site, WordPress
Posted by Fahim at 3:34 pm   Comments (4)

4 Responses to And then it happens …

Subscribe to comments with RSS

#1
Gravatar Image
Ainslie 24 May 2004 at 4:23 pm

Hi Fahim,
Though I best try this out know for you. Glad to see you have got there. 🙂
Thanks for the mention.

#2
Gravatar Image
Ozguru 05 June 2004 at 9:35 am

Any hint as to the required changes? I set up the plugin, looked OK, loaded the list from Jay Allen as per the recommendations and then got emails from readers about errors. What did you delete from the list? All the regex expressions?

#3
Gravatar Image
Fahim 05 June 2004 at 9:51 am

Did the errors start within the last couple of days? There was a problem with the latest MT blacklist update? I’ve posted a fixed version of the WP Blacklist and you can download it from http://sm.farook.org/files/WPBlacklist121.zip You might need to drop all your records in your blacklist table and reimport the list from Jay Allen after you’ve uploaded all the PHP files from the new build.

#4
Gravatar Image
Alex Ezell 03 July 2004 at 7:15 am

Are you going to release the MT->WP script that you wrote? I despise the existing one and was going to write one myself, but I found your site, so if you do offer it for download, why should I duplicate the effort?

Leave a response

:mrgreen: :neutral: :twisted: :shock: :smile: :???: :cool: :evil: :grin: :oops: :razz: :roll: :wink: :cry: :eek: :lol: :mad: :sad: