Michaelo wrote:
Ectoman, Just a note re accessing files outside the phpbb root should it be necessary...
Always use file_exists(string filename) where file name includes the full path to file to avoid possible remote injection.
This function will not work on remote files; the file to be examined must be accessible via the server's filesystem.
Why? I know when my files exist. (EDIT: I know what you are referring to now.. and I don't use outside files within phpbb, its the other way around).
EXreaction wrote:
I don't understand how you have a problem with it...all I had to change was the $phpbb_root_path from ./ to phpBB3/ and it worked fine for me(I have it as index.php, my forums start with phpBB3/index.php).
The reason for this is.. I have my site setup in a way that would not allow you to be in a folder other than the phpBB3 folder. I have a top.php page, and a bottom.php page located in root that has the phpBB code in it. It is not possible to include the phpBB files without having phpbb_root_path being the absolute location using the whole path. If I have an /index.php page it would work.. but if I use a folder: /folder/index.php (and include top and bottom using relative paths, it still needs the absolute path for the phpbb files otherwise it would try to find the forum at: /folder/phpBB3/...
Kinda hard to explain.
But I need to use server root path, otherwise it will never know where the phpbB files are when you are in different folders.
It isn't a big deal.. the only thing that would ever get called outside of the phpBB folder is the login_box.. when it generates it outside of the phpBB folder, it tries to call up images, and the form action as being serverroot/htdocs/phpbb/ucp....
Unless someone can show me a better way other than putting in the relative path from each file to the forums itself.. I'd appreciate to see how else it can be done.