RE: [PHP-DB] PostgreSQL and PHP

From: Date: Tue, 21 Nov 2000 17:08:57 +0000
Subject: RE: [PHP-DB] PostgreSQL and PHP
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4615@lists.php.net to get a copy of this message
I'd suggest PHP-lib. I use it as an abstraction layer and it saves tons of problems, and also allows for easy porting between MySQL and PostgreSQL... ________________________________________ Justin Rodino <justin@goldendome.com> Web Application Developer Golden Dome Media PO Box 1616 Notre Dame, IN 46634 219.631.1116 219.674.0980 800.728.7979 219.631.1001 - fax http://www.goldendome.com/ http://www.wndu.com/ > -----Original Message----- > From: fabrizio.ermini@sysdat.it [mailto:fabrizio.ermini@sysdat.it] > Sent: Tuesday, November 21, 2000 12:09 PM > To: php-db@lists.php.net > Subject: Re: [PHP-DB] PostgreSQL and PHP > > > > $conn = pg_connect("host=hostname user=username > password=password dbname=dbname"); > > > > This is working great, but what I would like to do is set > up an login ini file, so that my username and password aren't > as easily accessable. I've been experimenting with my MYSQL > ini file, but lack the experience with PHP to get it going. > Can anyone supply me with a URL to a website that > details this proccess? Or sample code if it isn't too much trouble? > > > What do you want to do exactly? I mean, hiding your connection > info from other site hosted on the same computer (if you're on a > provider host) or from site users? > > Since PHP is server side, end user never sees code so your > account info are safe. If you want to simply take them off from your > web directory, you can use a include() or require() statement to get > a file containing the pg_connect instruction from another directory > (you can select it with the php_include_path option in the > configuration file) . However, this directory > must be readable from the http server process, so it's simply > "hidden", not "protected", if you know what I mean. > > HTH, bye > > > /\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/ > > Fabrizio Ermini Alternate E-mail: > C.so Umberto, 7 faermini@tin.it > loc. Meleto Valdarno Mail on GSM: (keep it short!) > 52020 Cavriglia (AR) faermini@sms.tin.it > > -- > PHP Database Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net > For additional commands, e-mail: php-db-help@lists.php.net > To contact the list administrators, e-mail: > php-list-admin@lists.php.net >

« previous php.db (#4615) next »