Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-14 Thread Jochem Maas
tedd wrote: > At 12:43 PM +0100 1/11/07, Jochem Maas wrote: >> Satyam wrote: >> >>> No problem there, the include in my DB abstraction layer includes and >>> calls the separate file with the function to make the connection to the >>> database. Though the main application source doesn't know abou

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-14 Thread tedd
At 12:43 PM +0100 1/11/07, Jochem Maas wrote: Satyam wrote: No problem there, the include in my DB abstraction layer includes and calls the separate file with the function to make the connection to the database. Though the main application source doesn't know about the include file with the

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-12 Thread Jochem Maas
Otto Wyss wrote: > Jochem Maas wrote: ... >>> ?> >> >> I never include the closing php tag in include files to avoid >> stray empty lines being output - which can cause any headers >> that you try to send after the offending include file is included >> to fail. >> > I'm used to code everything as

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-11 Thread Otto Wyss
Jochem Maas wrote: > > this file outside of the webroot ... > > I thought so too but wasn't sure if possible. >> >> if (!defined ("config_include")) die ("Error..."); > > It helps me a little if I make mistakes. > > granted define() is slower than creating a var - which is why some > > people

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-11 Thread Jochem Maas
Satyam wrote: > > No problem there, the include in my DB abstraction layer includes and > calls the separate file with the function to make the connection to the > database. Though the main application source doesn't know about the > include file with the connection data in it, the DB laye

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-11 Thread Satyam
- Original Message - From: "Jochem Maas" <[EMAIL PROTECTED]> To: "Satyam" <[EMAIL PROTECTED]> Cc: ; "Otto Wyss" <[EMAIL PROTECTED]> Sent: Thursday, January 11, 2007 12:16 AM Subject: Re: [PHP] Security with dbHost, dbUser, dbPassword S

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-10 Thread Jochem Maas
Satyam wrote: > > - Original Message - From: "Otto Wyss" <[EMAIL PROTECTED]> > >> What is the usual save way to store/use DB access info in a script. I >> currently just use some PHP variables in a file which I include in all >> other scripts. >> >> config.php >> > if (!defined ("config

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-10 Thread Satyam
- Original Message - From: "Otto Wyss" <[EMAIL PROTECTED]> What is the usual save way to store/use DB access info in a script. I currently just use some PHP variables in a file which I include in all other scripts. config.php Is this save enough or are there better ways? Where sh

Re: [PHP] Security with dbHost, dbUser, dbPassword

2007-01-10 Thread Jochem Maas
I think what your doing now is reasonably safe, but it assumes that apache will actually pass all .php files to php for processing. if the php module doesn't load for some reason then the contents of the file will be output in it's entirety - this is why it's much better to store this file outside

[PHP] Security with dbHost, dbUser, dbPassword

2007-01-10 Thread Otto Wyss
What is the usual save way to store/use DB access info in a script. I currently just use some PHP variables in a file which I include in all other scripts. config.php Is this save enough or are there better ways? Where should I store this file so it isn't accessible via the net but inside sc