ptoulis has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks I desperately need thy help..

I have installed Apache 2.2.11 on my Windows Vista (yeah!), and also mod_perl 2.0. I have Strawberry perl and through PPM I also installed HTML::Mason 1.40. So, theoretically I should be able to serve mason pages. However, although I mod_perl works well (the server processes .pl files), my Mason modules cause the server to throw a 500 Internal Error. The error log from Apache is this:
Loading CGI at runtime. You could increase shared memory between Apac +he processes by preloading it in your httpd.conf or handler.pl file Use of uninitialized value $file in concatenation (.) or string at C:/ +strawberry/perl/site/lib/HTML/Mason/Compiler/ToObject.pm line 116. Use of uninitialized value $file in concatenation (.) or string at C:/ +strawberry/perl/site/lib/HTML/Mason/Compiler/ToObject.pm line 116. Reference found where even-sized list expected at C:/strawberry/perl/s +ite/lib/HTML/Mason/Interp.pm line 610. [Mon Apr 06 12:10:07 2009] [error] [client 127.0.0.1] Must specify eit +her 'comp_source' or 'comp_file' parameter to 'make_component()'\nSta +ck:\n [C:\\strawberry\\perl\\site\\lib\\HTML\\Mason\\Request.pm:556] +\n [C:\\strawberry\\perl\\site\\lib\\HTML\\Mason\\ApacheHandler.pm:2 +06]\n [C:\\strawberry\\perl\\site\\lib\\HTML\\Mason\\Request.pm:331] +\n [C:\\strawberry\\perl\\site\\lib\\HTML\\Mason\\Request.pm:211]\n + [C:\\strawberry\\perl\\site\\lib\\HTML\\Mason\\ApacheHandler.pm:97]\ +n [C:\\strawberry\\perl\\site\\lib\\Class\\Container.pm:275]\n [C:\ +\strawberry\\perl\\site\\lib\\Class\\Container.pm:353]\n [C:\\strawb +erry\\perl\\site\\lib\\HTML\\Mason\\Interp.pm:348]\n [C:\\strawberry +\\perl\\site\\lib\\HTML\\Mason\\ApacheHandler.pm:868]\n [C:\\strawbe +rry\\perl\\site\\lib\\HTML\\Mason\\ApacheHandler.pm:822]\n [(eval 32 +):8]\n [-e:0]\n

Function parameters are not parsed well, which might indicate a problem with Params::Validate, but this is up-to-date in my machine.

My Apache configuration is this:
#MOD_PERL Settings LoadFile "C:/strawberry/perl/bin/perl510.dll" LoadModule perl_module modules/mod_perl.so <FilesMatch "\.pl$"> SetHandler perl-script PerlResponseHandler ModPerl::Registry Options +ExecCGI </FilesMatch> #MASON Settings PerlModule HTML::Mason::ApacheHandler <FilesMatch "\.html$"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </FilesMatch>


If anyone has encountered such problems before, please help.
Notice:Whoever helps me out of this nightmare, will be awarded with a cool Mason website, free of charge!* :)

* I may retrieve the offer without prior notice

Replies are listed 'Best First'.
Re: HTML::Mason problems in Apache 2.2 (Windows)
by Anonymous Monk on Apr 06, 2009 at 13:41 UTC
    Try specifying
    PerlSetVar MasonDataDir PerlSetVar MasonCompRoot
      This didn't do any good. The component directories do all exist and have the necessary permission settings.
        Then its a bug in your code.
        Use of uninitialized value $file in concatenation... Must specify either 'comp_source' or 'comp_file' parameter to 'make_co +mponent()
        are pretty specific