Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I've just inherited a college project (MySQL, Debian, php and lots
of javascript) that is now in production that doesn't work well
so I need to fix it.

Uh huh. student programmers.

It's not the database that's the problem, it's the "topology" that
the students used to stitch stuff together as well as their assumptions.
If I were still teaching (these were NOT my students - I'd never make
a student project a commerical website) I'd change their grade....

But I digress. I'm casually familiar with php, intimate with the rest
of the stuff. Since this is now hosted on a commercial ISP, I'm
limited to what I can do for configuration. it practical to have multiple files or should
I just stuff everything into one?



blanche cohen wrote:
Quoted text here. Click to load it

What is in  It's not a standard file - it's one of
your own.  Does it have configuration info?  Passwords?  Something else?

Whether you need one or more depends completely on what's in it.  If it
is configuration info or passwords, the entire site should use the same
settings.  Otherwise you have a maintenance nightmare.

Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.


On 01 Jul 2009 21:18:01 GMT, (blanche cohen) wrote:

Quoted text here. Click to load it

Usually something with a generic name like "" is a file
that you want included in every, or almost every, page.  So put
config, error handling, stuff like that into one file.  I sometimes
put my w3c validation bugs in there, too, although that includes
formatting -- so sue me.

Then if you have modules specific to certain groups of pages, name
them something else.


Quoted text here. Click to load it

OK. To the original poster: the file is probably called
because it will be rendered instead of downloaded if called directly.
Off course, that file should not be ABLE to be called directly, but the
students may not have thought about that and the commercial provider may
not offer other directories than publicly available ones. In which case
I'd seriously think of switching providers.

Calling it "" could make the file available for download
(and thus reveal passwords).

Best regards.


On Jul 1, 10:18=A0pm, (blanche cohen) wrote:
Quoted text here. Click to load it

It depends. Really the overriding concern is writing code which is
easy to manage (so if you do want multiple configs, they should all be
in the same location) and avoid nesting includes too deeply. The other
consideration is where you want to load different configs at runtime -
in which case alternative config files can be very handy. A secondary
concern is the amount of code you are loading - but this is only an
issue of these files are getting to more that 500 or so lines AND can
sensibly be seperated.


Site Timeline