1

Topic: config.php in safe directory

I want to place config.php in a safe directory (preferably my cgi-bin)
Will I have to modify all files that call for config.php and enter the new path?

I've been down so long it's beginning to look like up..

Re: config.php in safe directory

Yes, unfortunately. In version 1.1 of PunBB (which is in the works), the inclusion of config.php is done from include/common.php, so it will get easier in the next version :)

Edit: Could you perhaps solve it with a symlink?

"Programming is like sex: one mistake and you have to support it for the rest of your life."

Re: config.php in safe directory

I actually wrote like this on one of my forums (think it was a 1.0RC2 , but I guess it shouldn't matter which version it is)

<?php
include "/cgi-bin/config.php";

in a new file that I saved as forumroot/config.php

and moved the real config.php to /cgi-bin/

(I used another directory, but just for illustration)

so then it was possible to hide it from the masses ...

Re: config.php in safe directory

Ah, of course. That's a brilliant solution to the problem :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: config.php in safe directory

Thanks for that. It works a treat.

I've been down so long it's beginning to look like up..