RE: Determine AuthMySQL* directives in script?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Cool alternative.

We don't write .htaccess files like that though.

Anyway, I actually wrote a function to parse the .htaccess file, but I will
try this SetEnv/getenv technique also.

Thanks.

Regards,
Dwight
> -----Original Message-----
> From: Chris [mailto:dmagick@xxxxxxxxx]
> Sent: Thursday, April 19, 2007 7:20 PM
> To: Dwight Altman
> Cc: php-db@xxxxxxxxxxxxx
> Subject: Re:  Determine AuthMySQL* directives in script?
> 
> Dwight Altman wrote:
> > I only agree to it "depending" if I have to write my own function using
> a
> > regular expression to parse the .htaccess file, but I was wondering if
> it is
> > already available from a PHP function or variable.
> >
> > In the .htaccess file, the AuthMySQLDB directive:
> > 1) may not be present
> > 2) may be commented out
> > 3) may appear like the following starting in the first columns:
> > AuthMySQL...
> > AuthMySQLDB		aDataBaseName
> > AuthMySQL...
> > 4) may be commented out with a valid entry present
> > #AuthMySQLDB		oldInactiveDataBaseName
> > AuthMySQLDB		newActiveDataBaseName
> > 5) who knows? -- it may have other "white space" and not start in the
> first
> > column
> > 	AuthMySQLDB		newActiveDataBaseName
> >
> > Is that what you meant?  How else can it be specified in the .htaccess
> file?
> 
> No, I meant it depends on how it is defined in the htaccess file.
> 
> http://httpd.apache.org/docs/1.3/mod/mod_env.html
> 
> SetEnv AuthMySQLDB dbName
> 
> would allow you to:
> 
> $dbname = getenv('AuthMySQLDB');
> 
> 
> Apart from that I'm out of ideas :)
> 
> --
> Postgresql & php tutorials
> http://www.designmagick.com/

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux