|
|
|
good chemistry is complicated, and a little bit messy -LW |
|
| PerlMonks |
postgresql dbi connection problemby ralphie (Friar) |
| on Dec 18, 2001 at 15:05 UTC ( [id://132848]=perlquestion: print w/replies, xml ) | Need Help?? |
This is an archived low-energy page for bots and other anonmyous visitors. Please sign up if you are a human and want to interact.ralphie has asked for the wisdom of the Perl Monks concerning the following question:
hi all, i have what seems to me to be an interesting problem ... i'm converting a series of html docs and cgi scripts that i use as a query engine to a couple of cgi scripts, one which receives authentication information while the other handles query processing. the query page is frame-based, and follows the example included in the cgi.pm readme.
the problem i'm having is that the connect string in the converted script won't work using variables for username and password. here's the output from the dbitrace log from the connect attempt...
the log from a successful connection attempt, which i get when i explicitly pass a valid set of credentials in the connect string, is identical to that which i receive in the relevant portion of the earlier version when i pass the credentials in scalars. that log looks like this:
in both scripts the $username and $password scalars are successfully filled from parameters, and the connect statement is the standard $dbh=DBI->connect($dsn,$username,$password) or die print "error connecting to database ", $DBI::errstr, "\n"; obviously, the scalar values are not getting passed in the connect string in the problematic context, but at this point i'll be darned if i can figure out why. (those who feel i'm being excessively politically-correct by not using the more appropriate word above should recognize that i'm at a state computer, and lawyerz are everywhere.) has anyone run into this before? i don't have enough hair left to keep pulling it out like this ...
Back to
Seekers of Perl Wisdom
|
|
||||||||||||||||||||||||||||||||