I am using a PhP chat program and have had it running for some time now and it seems to work great. However, just recently, I have been having an internal server error when I try to access the help section. There is a little ? that you click and it accesses a file called help_popup.php3 which causes a popup window to apprea that contains help info. Now, however, when I click the little ? I still get the popup, but I get "Internal Server Error" . Now, if I type the URL of the help_popup.php3 file directly, I get a little more info:
Fatal error: Failed opening required './localization//localized.chat.php3' (include_path='') in /home/www/mywebsite/chat/help_popup.php3 on line 9
Ok, so it seems to be unable to open a file called "localize.chat.php3". That file happens to be in several directories, just in different languages. For english, the directory/file it is in is:
mywebsite/chat/localization/english/localized.chat.php3
Okn now here's the code in the help_popup.php3 file that seems to be the problem:
<?php
if (isset($HTTP_GET_VARS["L"])) $L = $HTTP_GET_VARS["L"];
// Fix a security hole
if (isset($L) && !is_dir('./localization/'.$L)) exit();
if (isset($HTTP_GET_VARS["Ver"])) $Ver = $HTTP_GET_VARS["Ver"];
require("./config/config.lib.php3");
require("./localization/".$L."/localized.chat.php3");
require("./lib/release.lib.php3");
Now, as I say, this only recently stopped working. It seems that the $L variable isn't working since in my error message the directory "english" is missing and I think that is what the $L is for.
It looks like the first "if(isset.... " is doing some sort of check that affects the $L variable, but I can't figure out what's happening here.
Can anyone offer any suggestions as to what the problem might be?
Thanks,
Basil