Hi,

I've just installed AntiSpam and now notice the following error appearing in the recent logs:-

Summary = require_once(/modules/comment/comment.admin.inc) ...

Details = require_once(/modules/comment/comment.admin.inc): failed to open stream: No such file or directory in /home/mysite/www/www/modules/antispam/antispam.cron.inc on line 13.

Cron is runing successfully on my site, is there something I have done wrong?

Thanks.

CommentFileSizeAuthor
#7 antispam-debug.tar_.gz18.6 KBpixture

Comments

pixture’s picture

comment.admin.inc is a part of Drupal's standard comment module and AntiSpam module needs to include this comment.admin.inc file to use _comment_delete_thread function in it. This is for deleting spam comments automatically when the specified time to keep spam comments is expired.

Anyway, what's the path of your Drupal root directory and DocumentRoot for the web server?

Is the comment.admin.inc file in your (DocumentRoot)/modules/comment/ directory?

Thanks,

Josie_h’s picture

Hi pixture,

Thanks for the reply.

I'm new to this so please bear with me.

I installed Drupal in the root directory on my hosting server (eg index.php is in the root and the rest of the directory structure remains exactly as Drupal came when unzipped). I'm not sure I understand what you ask when you mention 'what's the path to the DocumentRoot for the web server, could you please enlighten me a little.

'comment.admin.inc' is in (as shown in my hosts CP) www/www/modules/comment/ . But as mentioned, I'm not sure if this is the same as (DocumentRoot)/modules/comment/ .

Sorry that I'm none too techy and apologies if I'm confusing things, I'll happily try to explain more if I can.

I get this error in the log every time cron runs automatically. If I run cron manually it doesn't seem to create the error.

Thanks again.

pixture’s picture

I guess that the problem is that $_SERVER[DOCUMENT_ROOT] does not correctly points the directory of your root directory. If your index.php is located in /home/mysite/www/www/ directory, then the $_SERVER[DOCUMENT_ROOT] needs to be points the same directory /home/mysite/www/www/.

You can easily check by creating and running a following program. First create a new script test.php in at your root directory with the following PHP code.

<?php
  echo $_SERVER['DOCUMENT_ROOT'];
?>

Then, run this script from the browser. http://yoursite.com/test.php
Please let me know what you get.

Thanks,

Josie_h’s picture

I hope I've done this right pixture.

I created the file, ftp'd it to my host root dir, ran the url to the test.php and got the following response:-

/home/mysite/www/www

Have I installed Drupal or something in the wrong directory?

Thanks for your support.

pixture’s picture

Josie_h,

Thanks for the info. I think I got what's wrong. This is not your issue but a bug of the AntiSpam module.
Give me a couple of days for finding the resolution on this. Again, thanks for your help.

Josie_h’s picture

pixture,

It's a surprise I haven't done something wrong.

Many thanks for your help. Will keep an eye on this thread.

pixture’s picture

StatusFileSize
new18.6 KB

Josie_h,

Attached is the archive of possible bug fix of this issue. It includes antispam.module and antispam.cron.inc files. When you have chance, please replace the exiting ones with these files and see how it works.
I have tested locally with my test site and it seems to be working OK. Anyway, when you have time, please give it a try. If it works for you too, I will add this bug fix to the CVS and release it.

Thank you,

Josie_h’s picture

Hi pixture,

I did exactly as you said and uploaded the new files to my site...

100% success, no more errors in the log when cron runs.

Thank you very much for your support and going easy on me with the tech stuff.

Also thanks for supplying/maintaining the module, it works great in my installation.

Please close this issue if you consider it finalised, I'm certainly happy.

Again, many thanks and good wishes.

pixture’s picture

Assigned: Unassigned » pixture
Status: Active » Fixed

Josie_h,

Thank you for testing the code at your site. I have added the bug fix as well as other bug fixes and officially released it as beta-2. :-)

pixture’s picture

Status: Fixed » Closed (fixed)

Bug fixed and released as 1.0-beta2