I have a similar question to a previous poster, but not quite the same.
I am set up on a godaddy dedicated box, so I'm trying to stay as far
away from their pre-set up stuff as possible, and using .htaccess files
for all my mason setup.

I have multiple virtualhosts, based off of the same set of perl
libraries, but with different sets of libraries.  What's happening is
that each time I reload the page, I'm getting a different set of dynamic
pages from the database.  I'm assuming this has to do with one apache
processes having site1's version of CMS::DBI (my class::dbi library) and
another having site2's.

My setup looks something like this:

/home/user/mason/site1
/home/user/mason/site2
/home/user/site1
                /lib/CMS/DBI.pm
                foo.html
                .htaccess
                [...]
/home/user/site2
                /lib/CMS/DBI.pm
                foo.html
                .htaccess
                [...]

The libraries all have the same name, and each copy of DBI.pm has a
different database and user/pass defined.

Each .htaccess file looks like:

<FilesMatch "(\.html|\.htm|\.txt|\.pl|\.vcf)$">
        SetHandler perl-script
        PerlHandler HTML::Mason::ApacheHandler
</FilesMatch>
<FilesMatch "(\.m(html|txt|pl)|dhandler|autohandler)$">
SetHandler perl-script
PerlInitHandler Apache::Constants::NOT_FOUND
</FilesMatch>

PerlSetVar MasonAllowGlobals $dbh
PerlAddVar MasonAllowGlobals $user
PerlSetVar MasonArgsMethod mod_perl
PerlSetVar MasonUseObjectFiles 0
PerlSetVar MasonCompRoot    /home/user/site1
PerlSetVar MasonDataDir     /home/user/mason/site1
DirectoryIndex index.html index.htm index.shtml

With the other one using site2 for the directories of course.

I'm only guessing that the issue is because of either the CMS::DBI
libraries are named the same or I need to create a MyApp.pm handler for
each one (ie: http://marc.info/?l=mason&m=117486719711187&w=2 ).

Assuming that either of these is the problem, what's my best solution?
If I create a MyHandlerSite1.pm and a MyHandlerSite2.pm what would they
look like and can I use that way and still keep with only using the
.htaccess files (godaddy's control panel overwrites the apache config
files when new domains are added).

TIA

-- 
Alan <[EMAIL PROTECTED]> - http://arcterex.net
--------------------------------------------------------------------
"Backups are for people who don't pray."                 -- big Mike

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to