Arrow

Version 2.8 released! | Peter's Custom Anti-Spam for WordPress | Forum

Back to the custom anti-spam plugin page

Please consider registering
guest

Log In

Lost password?
Advanced Search

— Forum Scope —

  

— Match —

   

— Forum Options —

   

Minimum search word length is 4 characters - maximum search word length is 84 characters

Topic RSS
Version 2.8 released!
June 17, 2007
5:57 pm
Peter
Admin
Forum Posts: 841
Offline

New features:
-Automatic resizing of the font for long words
-A new diagnostic page in the admin panel under Manage > Custom anti-spam

Download it on the plugin page, as always:

http://www.theblog.ca/?p=21

June 26, 2007
7:10 pm
wirelessguru
Guest

Peter,

I am getting the following error after I moved the index.php and .htaccess files to my root directory, and other necessary changes to move my site from a /blog subdirectory to my root directory:

[26-Jun-2007 17:46:20] PHP Fatal error: Call to undefined function: add_action() in /home/xxxxxx/public_html/xxxxxx/blog/wp-content/plugins/custom-anti-spam/custom_anti_spam.php on line 394

Also, on your new 2.8 diagnosis page I temporarily made the suggested open_basedir change, but then only a basic font would appear - even when changing the font path and moving copies of the fonts to my root directory and /blog sub-directory. Reverting back to "$cas_abspath = false;" and commenting out the path fixed the font problem.

The above error appears with or without the open_basedir change. Again the plugin is working, I'm just concerned about the error_log becoming too big becuase it adds another line on every hit to my website.

Thank you.

June 27, 2007
12:19 am
Peter
Admin
Forum Posts: 841
Offline

This is a bit of a mystery...

If you access the plugin file directly, you'll see on my blog that you get the same error:

Here

But the file isn't supposed to be accessed directly. Can you confirm that there's an error every time your site is accessed or is it only if you browse to the plugin file directly?

Also, is there a reason why you didn't move all of the folders? For example, instead of /blog/wp-content, just move it to /wp-content?

June 27, 2007
10:59 am
wirelessguru
Guest

It appears the error causes an additional line in the error_log each time a comment page is accessed. There's about 100 lines in the log in the past 18 hours or so, some of which occurred in the middle of the night while I was asleep. I've never accessed the file directly.

I had initially had my entire blog in a /blog subdirectory for testing then upon reading this codex article http://codex.wordpress.org/Giv....._Directory I thought I would move my site to the root following the suggestions on that page. But I'm not opposed to moving the wp- directories to root as well.

Will try that in the next few days and report back.

Thanks.

June 27, 2007
12:29 pm
Peter
Admin
Forum Posts: 841
Offline

Well, I'm not sure if moving the directories would solve the problem -- it's only a guess since it was working before the move, right? :(

June 28, 2007
12:18 am
wirelessguru
Guest

Having the WP core files and index.php in the same directory or root may solve the problem.

I thought you might know what code was on line 394 - and if it was related to a path.

Again, I'll try moving everything to root in a few days after I iron-out some other issues...

A strange thing happened last night. When I woke up this morning, all the comments from all posts and pages had suddenly become posts too. I seriously doubt it was related to your plugin, I'm just going to wait a few days to see if it mysteriously happens again. Every come across THAT problem before?

June 28, 2007
1:52 am
Peter
Admin
Forum Posts: 841
Offline

Ah, you know what, I need to release a new version with a fix for that. The code that adds the admin menu is also trying to execute when the anti-spam image is generated. That is what is giving the error.

If you don't want to download the new version (thus keeping any modifications you made), edit the plugin file and find "new PeterAntiSpam();". Cut the curly bracket ("}") below that and place it as the second-to-last line in the plugin file (above "?>") and below "add_action('admin_menu','cas_adminmenu',1);"

That should do the trick.

Thanks so much for sharing your problem! I will now go release the bug-fix version.

June 29, 2007
11:12 am
wirelessguru
Guest

Rather than edit 2.8, I just downloaded 2.8.1 - and I'm getting no more error log :)

Thanks for your prompt response and a fix. If you'd like to see your plug-in in action, see my website at http://www.renowirelessinfo.com

Thanks again.