Re: PHP and passwords
| From: | Sam Masiello | Date: | Thu, 28 Feb 2002 19:16:31 +0000 |
| Subject: | Re: PHP and passwords | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-86646@lists.php.net to get a copy of this message | ||
What you could do is have a script called connect.inc which has your
pg_pconnect statement, then use the "include" directive to include your
connect.inc on all of your subsequent PHP pages. This way you only have the
username/password hard coded in one location so if the username/password
were to change, you only have to change one script instead of changing many.
HTH
Sam Masiello
Software Quality Assurance Engineer
Synacor
(716) 853-1362 X289
smasiello@synacor.com
----- Original Message -----
From: "webmaster" <webmaster@harbornet.com>
To: <php-general@lists.php.net>
Sent: Thursday, February 28, 2002 4:59 AM
Subject: [PHP] PHP and passwords
> Is there a way to connect to your database using php without hard coding
> a password into the php file? We run PostgreSQL 7.1 on a Linux 7.2
> server with the latest version of apache. I don't want to change the
> authentication within Postgres to not require a password. But I also,
> for security reasons, don't want to have passwords coded into the php
> scripts for accessing the database. I'm very new to php, but very
> excited about what I've learned so far. Any help would be appreciated.
>
> thanks,
>
> Elkan
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>