Hi again,

I kind of feel stupid now, but at least I learned a lesson.

For some reason my database connection component did not throw an  
error when it should have. A simple typo made it connect to a wrong  
database, to which that user did not have access to.

I simply left the problem alone for a while and returned to it seeing  
the obvious mistake I made.

Everything is working as expected - if my fat fingers would have type  
the right name from start :(

Sorry for troubling you all. But I wouldn't mind getting hints on how  
to make database connections even better, still.

Goodnight from Denmark

Regards

  - Nicolai


Quoting Nicolai <[EMAIL PROTECTED]>:

> Hi all,
>
> I have put myself in a bit of a pickle, but hope someone here can help me.
>
> In my handler I have two global vars ($dbh and $dbh_itemdb).
>
> I set these in a <%once> clause like:
>
> $dbh        = DBI->connect("DBI:mysql:$base:localhost", "$user", "$pass");
> $dbh_itemdb = DBI->connect("DBI:mysql:$item:localhost", "$user", "$pass");
>
> If I comment out the 2nd line everything works (besides looking up
> items). If I enable the 2nd line I get "Premature end of script
> headers" for each request I make.
>
> I then tried the same code base on a different server, and it works!
> (as I would have thought would be the case on my primary server).
>
> I have compared versions and found DBI in v1.56 on my primary box
> which I then upgraded to v1.60.1 but on the secondary box I have v1.57
> and didn't do anything subsequently. I also recompiled DBD-mysql after
> upgrading DBI.
>
> I also tried using connect_cached, but I read in docs that DBI already
> does this for me, so I left things as they were in that area (but
> tried both - naturally).
>
> My system is FreeBSD 6.2-p10 with Mason v1.35, Apache 2.2.4_2,
> mod_perl v2.0.3, and MySQL v5.0.41.
>
> The background for even splitting my database in the first place for
> this site is, that I want to make separate backup of the data. The 1st
> database is the vital one which I'm backing up every hour. The 2nd
> database is just an inventory list which I can generate from flat
> files whenever I want - hence I don't really need a backup (that
> often) - and it is HUGE in size compared to the dynamic content in the
> 1st DB.
>
> Any hints are much appreciated
>
> Thank you in advance
>
> Regards
>
> Nicolai Schlenzig,
> Denmark
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2005.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Mason-users mailing list
> Mason-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/mason-users
>



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to