[thelist] RE: PHP Problem

muinar muinar at gmx.net
Fri Nov 17 19:00:49 CST 2000


May I jump in with another 'include' question:

I recently decided to include the opening tags (php3 opening sql database)
of several sites from a shared file.

Some day the database quitted its service for some hours, and when I
looked at the pages, I was a bit shocked: The error message pointed
to the include file, and when I clicked on the URL which was shown,
voilà - the include file *with db password* was presented!

Had to change the db password that weekend and rewrote the code of all
the pages, omitting the include function.

So my question is, how can I include the db opening code without
the risk of presenting it to visitors in case the db quits? Can
I use file permissions here? Or is there another approach?

Thanks for any hints.


At 09:42 17.11.00 -0600, Jeremy Ashcraft wrote:
>A nice feature of the include function is that it can grab URLs as well.  I
>had a similar problem with including a perl script from within a PHP.  Just
>pass the entire URL to the include function and it will make a normal
>request to the webserver:
>should do the trick.  HTH

More information about the thelist mailing list