FIX: Pyzor 0.4.0’s Discover Problem

July 24th, 2008 at 1:27 pm by Mark Steel
Tags: , , , , , , , ,

     If you’re using Pyzor to help you block spam (a lot of people use it alongside SpamAssassin), then you’ve probably run into these nasty “pyzor: check failed: internal error” messages in your maillog since July 21st.
     After digging into on my own a bit, I found two things.  The first was the “InternalError” was being caused by a corrupt “servers” file that contained nothing but “File Not Found” information.  The second was that the “discover” command line was returning:

downloading servers from http://pyzor.sourceforge.net/cgi-bin/inform-servers-0-3-x
Traceback (most recent call last):
  File “/usr/bin/pyzor”, line 4, in ?
    pyzor.client.run()
  File “/usr/lib/python2.4/site-packages/pyzor/client.py”, line 991, in run
    ExecCall().run()
  File “/usr/lib/python2.4/site-packages/pyzor/client.py”, line 185, in run
    self.servers  = self.get_servers(servers_fn)
  File “/usr/lib/python2.4/site-packages/pyzor/client.py”, line 410, in get_servers
    servers.read(open(servers_fn))
  File “/usr/lib/python2.4/site-packages/pyzor/client.py”, line 119, in read
    self.append(pyzor.Address.from_str(line))
  File “/usr/lib/python2.4/site-packages/pyzor/__init__.py”, line 458, in from_str
    fields[1] = int(fields[1])
IndexError: list index out of range 

     Obviously, linking to non-existent files, especially in the /cgi-bin/ directory, is a bad thing.

     As a temporary measure, simply disable your “pyzor discover” cron job, and manually add “82.94.255.100:24441″ into your “servers” file (wherever it may be with your configuration).

FIX: Search Everything 4.6 Setting Issues

June 22nd, 2008 at 3:53 pm by Mark Steel
Tags: , , , , , ,

     Ya know, I saw a random bug report in the Wordpress forums about the Search Everything plugin with no actual description about what the bug was.  It just had a code snippet and said “108.”  No explanation, no fix… Just a complaint that says “108.”

     In SE-Admin.php, change Line 108 from:

<p><input type=”checkbox” id=”search_drafts” name=”search_drafts” value=”true”  <?php if($options['SE4_use_draft_search'] == ‘true’) { echo ‘checked=”true”‘; } ?>

     To:

<p><input type=”checkbox” id=”search_drafts” name=”search_drafts” value=”true”  <?php if($options['SE4_use_draft_search'] == ‘true’) { echo ‘checked=”true”‘; } ?> />

     Of course, while you’re at it, you can fix Line 102 from:

<p>     <input type=”checkbox” class=”SE_text_input” id=”appvd_comments” name=”appvd_comments” value=”true”  <?php if($options['SE4_approved_comments_only'] == ‘true’) { echo ‘checked=”true”‘; } ?>

to

<p>     <input type=”checkbox” class=”SE_text_input” id=”appvd_comments” name=”appvd_comments” value=”true”  <?php if($options['SE4_approved_comments_only'] == ‘true’) { echo ‘checked=”true”‘; } ?> />

     After doing that, some of the check boxes will actually show and work on the Settings page…

FIX: Wordpress 2.5 / Akismet 2.1.4

May 14th, 2008 at 11:59 am by Mark Steel
Tags: , , , , , , ,

     There’s a stopper-style bug in the the latest Akismet plugin for Wordpress.  If you have multiple pages of Spam Comments, it keeps returning the first fifty — not good if you get as much Spam as we do, as we have to periodically check for false positives.
     The fix is easy…

     In Akismet 2.1.4, change wp-content/plugins/akismet/akismet.php, line 483 from:

        $comments = akismet_spam_comments( $current_type );

     to

        $comments = akismet_spam_comments( $current_type, $page );

     And Enjoy.  ;-)

LOLcat Generator, anyone?

May 23rd, 2007 at 6:04 pm by Mark Steel
Tags: , , , , ,

     My friend Anton came up with a great new way to use up all that annoying, excess, monthly bandwidth … *snicker*

     In the spirit of I CAN HAS CHEEZBURGER?, he brings you…


LOLcat Generator

     The lolcatgenerator.com

     Create your own LOLcat!  Vote on others!  And if you act now, you’ll get the personal satisfaction of knowing you made the funniest one and have no way to prove it! ;-)

Note: I R GUD BETA TESTER!

reacTable: The 21st Century Synthesizer

April 2nd, 2007 at 12:50 am by Mark Steel
Tags: , , , , ,

     Basically, the reacTable is a flat surface that makes sounds and music by dropping different modules onto it, and positoning them so that get the sound you want.  Modules range from tone generators, to strobes, to noise gates, etc. etc.  It’s like a musical flowchart…
     From its designers at Pompeu Fabra University in Barcelona:

The reactable hardware is based on a translucent round table. A video camera situated beneath, continuously analyzes the table surface, tracking the nature, position and orientation of the objects that are distributed on its surface, representing the components of a classic modular synthesizer. These objects are passive without any sensors or actuators, users interact by moving them, changing their position, their orientation or their faces (in the case of volumetric objects). These actions directly control the topological structure and parameters of the sound synthesizer. A projector, also from underneath the table, draws dynamic animations on its surface, providing a visual feedback of the state, the activity and the main characteristics of the sounds produced by the audio synthesizer.

     Put simply:  I WANT ONE!

     In case you’re not getting it, I’m gonna post all three demo videos for this thing.  This first is Basic Demo #1.

     Does that deserve a, “Whoah!” or what?  This is cool stuff!  So we go on to Basic Demo #2:

     Starting to understand it?  Then you’ve gotta check out the Improvisation Demo:

 

     The fun part is, it’s components are not exactly “cutting edge.”  But the very idea of putting something together in this fashion is leaps and bounds ahead.  Serious kudos are due its creators!

     The “Cool” Factor doesn’t stop there.  This puppy even runs on Open Source software!

     Be certain to check out their website

Tip: Anton, over at LR2

Anachronistic Icons

March 23rd, 2007 at 1:38 pm by Monty Hazeltrig
Tags: , , , , , , ,

floppy

Do you have a floppy drive? No? When was the last time you used a floppy? My daughter used floppies on occasion to get work from home to school, but now she is using a thumb drive. Most of us see a floppy disk as a leftover from the computer days of yesteryear. And in computer days, yesteryear comes pretty quick.

So, with the floppy quickly becoming as remote as the 5.25 inch floppy, or cassette loader to us, why is a floppy the icon for “Saving” on so many pieces of software? And will it continue on until the only floppies are in museums?

This is already happening in another common, but overlooked place: you car dashboard. Do you have an ashtray in your car? Lighter? No? But I bet you have a cell phone charger and it has a plug on it that is the size of a cucumber. Why? Because it fits the cigarette lighter hole that is still there even though no one uses a cigarette lighter in the car or even has an ashtray! That big ol’ hole will likely remain in your dash for decades. In 50 years, no one on Earth will smoke and we’ll have hover craft to zip around in running on cold fusion and there will still be a huge hole in the dash we plug our devices into and no one will know why.

Fix the Google Sitemap Generator Plugin for Wordpress

March 7th, 2007 at 12:23 pm by Mark Steel
Tags: , , , , , , ,

     Arne Brachnold’s Google Sitemap Generator for Wordpress is a pretty neat piece of software that’ll build a Google-style XML-Sitemap, and ping Google with it every time you update your blog.
     Good stuff for SEO, good stuff for making sure Google has your site indexed. 

     After setting up a few blogs with the latest, I found a caveat that just annoyed me to death: you’re in the Admin, but when you manually update the sitemap, it comes back with a blank page. Sure, I know how to work around it, but they guys I’m setting this stuff up for get all huffy about it.
     Pretty quick bug to figure out.  There’s even a nice ticket on Trac (Ticket 604) that I’m unable to post this solution to…
     Line 2463 of sitemap.php is:

<script type=”text/javascript” src=”list-manipulation.js” mce_src=”list-manipulation.js”></script>

     Of course, that doesn’t exist, but if we change it to:

<script type=”text/javascript” src=”../wp-includes/js/list-manipulation-js.php” mce_src=”../wp-includes/js/list-manipulation-js.php”></script>

     …then all is right and good with the world.

     Hopefully, Arne’ll drop this in his next release — and be able to close Ticket 604 on Trac.  ;-)

[Ed. Note: The text of this article refers to "the latest" Wordpress (2.1.x) and version of the plugin for it (3.0xxx).]

New (Old) Banners and Logos

March 2nd, 2007 at 3:31 pm by Mark Steel
Tags: , , ,

     A few people have asked lately, “Hey, what happened to the old Logos you had that changed every few minutes?”
     I did away with ‘em when I converted to Wordpress, and never really got around to doing much with this theme, aside from fixing the pixel shift in IE and adding the junk I wanted to.

     I took five minutes today to re-write them a little so they’d fit in against the blue background at the top of the page.  Turned the cron job back on. 

     Looks like they’re working!

Invision Power Board Code Bug

March 1st, 2007 at 11:37 am by Mark Steel
Tags: , , , , , ,

     Yesterday, I was called to fix this bug, which caused a SQL error when users would go to the Stats / Leaders page:

Error:

mySQL query error: SELECT m.id, m.name, m.email, m.hide_email, m.location, m.aim_name, m.icq_number,
  f.id as forum_id, f.read_perms, f.name as forum_name, c.state
  FROM ibf_members m, ibf_categories c
  LEFT JOIN ibf_moderators mod ON((m.id=mod.member_id or (mod.is_group=1 and mod.group_id=m.mgroup)))
  LEFT JOIN ibf_forums f ON(f.id=mod.forum_id)
  WHERE c.id=f.category AND c.state != 0

mySQL error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mod ON((m.id=mod.member_id or (mod.is_group=1 and mod.group_id=m.mgroup)))’ at line 4

     Not too difficult to spot that first LEFT JOIN is broke … Editing the query in ~/sources/misc/stats.php, line 255, and surrounding `mod` with backticks did the job.

     Although, it’d be nice if customers would keep their software versions up-to-date…

More on Software

February 28th, 2007 at 3:32 pm by Mark Steel
Tags: , , , , , , , ,

     (”Mark, why so much work talk?”  Because it’s easier to work and laugh than to think about things that are bothering me.  And besides, I’ve only rarely spoken about what I actually do for a living, anyway.) 

     A few days ago, Swankpad’s forum got weird.  Something happened and every post title was set to the same value.  Today, I found out for certain that exactly what code modification was causing it.
     Instead of adding code for upgrades and Mods to phpBB, it’s preferable to use a Patch File for software upgrades, and a neat little thing called EasyMOD to add in any future mods.  EasyMOD is great, and generally makes fewer mistakes than going through many thousands of lines of code to make changes (although, an uninstall feature would be nice!).

     There was a new mod called Akismet Spam Butcher for phpBB that I decided to install last week, just for the heck it — too many spammers.  Though the plugin doesn’t actually *do* anything, it was more of a proof-of-concept for using Akismet with phpBB.  I wanted to see how well it worked in adding Spam flags to the database — which is all it does at present.
     (In all honesty, if you can keep people from registering, that alleviates the spam issue altogether.  ;-) )

      Anyway … Take a look at this SQL statement, from phpBB with Akismet Spam Butcher added via EasyMOD:

$sql  = ($mode != “editpost”) ? “INSERT INTO ” . TOPICS_TABLE . ” (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote, topic_spam) VALUES (’$post_subject’, ” . $userdata['user_id'] . “, $current_time, $forum_id, ” . TOPIC_UNLOCKED . “, $topic_type, $topic_vote, $post_spam)” : “UPDATE ” . TOPICS_TABLE . ” SET topic_title = ‘$post_subject’, topic_type = $topic_type ” . (($post_data['edit_vote'] || !empty($poll_title)) ? “, topic_vote = ” . $topic_vote : “”) . ” , topic_spam = $post_spamWHERE topic_id = $topic_id”;

     Sometimes it’s just glaringly obvious where the problem is.

     One Edit, and every post in entire bloody forum gets the post title you edited.

     (Hint:  “$topic_spam = 0″)

     *shakes head*

#—–[ IN-LINE FIND ]———————————
# Yes, we’re still working within the same FIND
# Note that the space here is important, you will need to be sure there is
# a space between what’s there and what we’ll add next
#
 WHERE topic_id = $topic_id”;
#
#—–[ IN-LINE BEFORE, ADD ]————————
#
, topic_spam = $post_spam

     Looks like EasyMOD was the culprit… but then again, I probably would’ve done the syntax a little differently due to the spaces.

     Removing the Spam Butcher anyway … I found a more elegant solution. ;-)