Jump to content

HCBF Members Page


monark

Recommended Posts

  • Members

One thought, though -

It night not be a good idea to put the database username and password in a public page. I'd kinda prefer we didn't because if php ever hiccups the webserver will display the contents of a php file instead of executing it.

I'd put the info in a separate file in another directory - call it config.inc.php or something like that and stick an .htaccess in there to deny access to anybody but the webserver user (apache). I can help you with the .htaccess file - I don't think you can set one in there that can be read only by the webserver without a little help from root ;)

Something like this in a directory called "admin" would work -

require('./admin/config.inc.php');

and set the variables there.

Food for thought - I know you're still fooling around with this stuff and I don't speak php at all ;)

Link to comment
Share on other sites

  • Replies 157
  • Created
  • Last Reply
  • Members
Originally posted by allan grossman

One thought, though -


It night not be a good idea to put the database username and password in a public page. I'd kinda prefer we didn't because if php ever hiccups the webserver will display the contents of a php file instead of executing it.


I'd put the info in a separate file in another directory - call it config.inc.php or something like that and stick an .htaccess in there to deny access to anybody but the webserver user (apache). I can help you with the .htaccess file - I don't think you can set one in there that can be read only by the webserver without a little help from root
;)

Something like this in a directory called "admin" would work -


require('./admin/config.inc.php');


and set the variables there.


Food for thought - I know you're still fooling around with this stuff and I don't speak php at all
;)


good idea!

pwise.gif

Link to comment
Share on other sites

  • 16 years later...

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...