Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery
 
PerlMonks  

Re: Re: db user and cgi pardigm

by Anonymous Monk
on Mar 01, 2004 at 01:36 UTC ( [id://332748]=note: print w/replies, xml ) Need Help??


in reply to Re: db user and cgi pardigm
in thread db user and cgi pardigm

I am very sorry. I did not explain myself very well (as evidence that 3 of you 'took' my question the same way).

Using the DBI module, won't I need to hardcode a database userid & password into my dvi script (for example, in the code above, in the 'update_db' function?

I was thinking about the colon delimited file b/c I could avoid the script having access to direcly write data to my db.

Does this explain it better? I hope so, and I am sorry for the misinterpretation.

thanks!!!

Replies are listed 'Best First'.
Re: Re: Re: db user and cgi pardigm
by Trimbach (Curate) on Mar 01, 2004 at 05:37 UTC
    Well, if you're determined to hand-update your database by forcing yourself to manually type your db's ID and password each time, then by all means write to a delimited file first. However, that solution isn't typical; there are a number of ways to secure a database password in a CGI environment, the most common approach being putting the ID and password into a file that is outside of your web server's root directory, setting the appropriate permissions to limit access, and then 'INCLUDE'-ing or "USE"-ing the file into your CGI. It all depends on your level of paranoia.

    Gary Blackburn
    Trained Killer

      Exactly. Otherwise you're going to go to the trouble of writing a needlessly complex (and most likely inferior) solution to a problem that has already been solved by CGI and DBI.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://332748]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-25 06:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found