[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason
Subject:    Re: [Mason] Not Ready For Mason?
From:       bmccoy () chapelperilous ! net
Date:       2000-09-25 19:00:28
[Download RAW message or body]

On Mon, 25 Sep 2000, Evan Carew wrote:

> I seem to have made a rather common mistake. I've found that mod_perl is
> tough to grow in certain areas & I made the decision to move to Mason.
> The mistake was I made this decision in the 11th hour & didn't leave
> much room for error. The time now being 11:30 and Mason still not
> working (see thread titled "PostgreSQL & DBI Connectivity Problems").
> <sigh>. I really like the way Mason looks, but if I can't get connected
> to my database, then I am going to have to fall back to straight
> mod_perl without mason sometime early this week. So, if anyone has heard
> of this problem, let me know.

I have been using PostgreSQL & DBI with Mason for a while now with no
problems.  In fact, I posted some code this past weekend that is part of a
Mason component that generates a menu from a database, in response to
someone else who was having problems with DBI. Here is the code I
posted:

<%init>

my $dbh = DBI->connect('dbi:Pg:dbname=bwm', 'user','passwd') or die
                "ERROR: Could not connect to backend $DBI::errstr";

#build the menu
my $menu_query = qq(SELECT * FROM menu WHERE type='$type');
my $hmenu = $dbh->prepare($menu_query) or die "Prepare failed: $DBI::errstr";
$hmenu->execute or die "Execute failed: $menu_query ($DBI::errstr)";
my $menu = $hmenu->fetchrow_hashref;

</%init>

...

<%args>
$type
</%args>

<%cleanup>
$dbh->disconnect;
</%cleanup>

At any rate, the other person who was having trouble (with MySQL & DBI)  
found that the problem was not with Mason or mod_perl, but with DBI -- he
had mismatched driver versions or something.

You might want to simplify your handler.pl & startup.pl files (I noticed
you had both loading CGI & DBI) for troubleshooting purposes until you can
track down where the problem originates.

Brett W. McCoy
                                         http://www.chapelperilous.net/~bmccoy/
-------------------------------------------------------------------------------
I like the way ONLY their mouths move ...  They look like DYING OYSTERS



_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
http://lists.sourceforge.net/mailman/listinfo/mason-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic