Helpful Docs to read before posting: (All Docs) | Config Docs | General FAQ | Mailing List Sending FAQ | Error FAQ

mail.cgi: Can't locate HTML/Entities.pm

How do I fix...

mail.cgi: Can't locate HTML/Entities.pm

Postby mdlueck » Thu Aug 12, 2010 4:39 am

Greetings Justin-

I have Dada logging enabled, and I am seeing MANY of this entry in our logs:

Code: Select all
[Thu Aug 12 02:12:26 2010] mail.cgi: Can't locate HTML/Entities.pm in @INC (@INC contains: ../../ ../../perllib ../../DADA ../../../ ../../../DADA/perllib ./ ../ ./../../DADA ../perllib ./dada ../dada ./DADA ../DADA ./DADA/perllib ../DADA/perllib /sw/lib/perl5/5.8.6/darwin-thread-multi-2level /sw/lib/perl5 ../../DADA/perllib ../../../perllib ../../../perl /etc/perl /usr/local/lib/perl/5.8.8 /usr/local/share/perl/5.8.8 /usr/lib/perl5 /usr/share/perl5 /usr/lib/perl/5.8 /usr/share/perl/5.8 /usr/local/lib/site_perl .) at /DADA/App/Guts.pm line 1364, <DATA> line 27.

I looked and indeed there is no "Entities.pm" in the HTML folder on our server... or in the "pro_dada-4_1_0.zip" I installed from.

Suggestions please? Thanks!
Thank You!
Michael Lueck
IT Director - Volunteer
mdlueck
 
Posts: 17
Joined: Mon Jun 14, 2010 11:30 am

Re: mail.cgi: Can't locate HTML/Entities.pm

Postby justin » Thu Aug 12, 2010 11:21 am

The HTML::Entities module doesn't actually come with Dada Mail - it's a module that has to be installed by your host to work correctly.

BUT, if it's not there, there is a fallback module that Dada Mail uses called, HTML::EntitiesPurePerl and that is included in Dada Mail - does the exact same thing, just slower at it.

Is it just that you get annoying errors in the error log, or, is Dada Mail not working because of this error?
User avatar
justin
 
Posts: 4581
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: mail.cgi: Can't locate HTML/Entities.pm

Postby justin » Thu Aug 12, 2010 11:27 am

If it's being a problem with things you're trying to do, you can try finding the, "decode_he" subroutine, in the DADA/App/Guts.pm file. Find these lines:

Code: Select all
   my $str = shift;
   require HTML::Entities;
   return HTML::Entities::encode_entities($str); # Uh, why is this Encoding, in a *decoding* subroutine?


And replace them with:

Code: Select all
   my $str = shift;
   eval {require HTML::Entities;};
   if(!$@){
      $str = HTML::Entities::encode_entities($str);
   
   }else{       
      eval {require HTML::EntitiesPurePerl;};
      if(!$@){
          $str = HTML::EntitiesPurePerl::encode_entities($str);
      }
   }
   return $str;


From what I can tell, it would actually cause an error in the program, in a few places, if you don't have the HTML::Entities module.
User avatar
justin
 
Posts: 4581
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO

Re: mail.cgi: Can't locate HTML/Entities.pm

Postby mdlueck » Thu Aug 12, 2010 11:30 am

Thanks for the explanation.

I suppose emails are getting out successfully... I hope.

I would prefer it would not log countless errors if there really are none... signal to noise ratio, I will surly miss any real errors at the current rate.

How hard would be a code fix to properly eliminate these errors?

P.S. I guess you posted twice now... I will test your work-around code, thanks!
Thank You!
Michael Lueck
IT Director - Volunteer
mdlueck
 
Posts: 17
Joined: Mon Jun 14, 2010 11:30 am

Re: mail.cgi: Can't locate HTML/Entities.pm

Postby mdlueck » Thu Aug 12, 2010 2:37 pm

Initially that looks to have quieted the error messages. I will check again tomorrow after the daily production mailing.

Thank you so much!

Will this get committed to your next production version, or is this a customization I must apply to future updates?
Thank You!
Michael Lueck
IT Director - Volunteer
mdlueck
 
Posts: 17
Joined: Mon Jun 14, 2010 11:30 am

Re: mail.cgi: Can't locate HTML/Entities.pm

Postby justin » Thu Aug 12, 2010 3:24 pm

Yeah, it'll be in the next version - should already be in the repo:

http://github.com/justingit/dada-mail/c ... f76d9487ee

Thanks for the report,
User avatar
justin
 
Posts: 4581
Joined: Wed Feb 13, 2008 8:41 pm
Location: Denver, CO


Return to Errors While Running Dada Mail

Who is online

Users browsing this forum: No registered users and 0 guests

Loading