Ano-Tech Computers
Enter keyword:

CentOS 5.2: HTML::Mason autohandler gets called twice per request
Problem:
After moving our virtual web hosts from SuSE 10.1 to CentOS 5.2 we had a peculiar problem with HTML::Mason. For some reason, all virtualhosts using autohandlers would wrap the requested HTML page in the autohandler HTML code twice.
 
Solution:
On the old SuSE server, we used one global
PerlAddVar MasonCompRoot "main => /base/path"
plus one
PerlAddVar MasonCompRoot "vhost => /base/path/vhost"
for each virtualhost.

On the CentOS 5.2 server we had to change this to just one
PerlSetVar MasonCompRoot /base/path/vhost
for each virtualhost.

Similarly, we had to replace
PerlAddVar MasonDataDir /base/path/vhost
with
PerlSetVar MasonDataDir /base/path/vhost
in order to get the cache to keep virtualhosts separate.


 
Discuss this solution
Did this article solve your problem? Yes No Did not apply

We welcome anyone who is willing to contribute to this public knowledge base, contact siteadmin@atc.no if you have information you would like to share. The idea is not to replace the commercial support sites, but to publish those hard-to-find solutions you've found yourself looking for over and over again.

Show all articles