PHP Version 4.0.4pl1
ok here is the problem...
in the file
/languages/english/generic.php
the following array is defined
--------------------------------------------------------------------------------
$lang[THIS_FILE] = 'english'
$lang[NEW_POST_ICON] = "Post";
$lang[PREV_ICON] = "Previous";
$lang[INDEX_ICON] = "Index";
$lang[NEXT_ICON] = "Next";
$lang[EXP_ICON] = "Expand";
$lang[COL_ICON] = "Collapse";
$lang[FLAT_ICON] = "Flat";
$lang[THREAD_ICON] = "Threaded";
$lang[EDIT_ICON] = "Edit";
$lang[REPLY_ICON] = "Reply";
$lang[FORUM_RETURN] = "Return to Forum";
...
$lang[DELETE_CHECK] = "Delete checked";
--------------------------------------------------------------------------------
This is from a working website, I simply copied all the files over to a new location, in order to do some beta work on a new design.
The problem seems to be in the new instance, located at gccbeta.gameclubcentral.com/forums.
altho the 2 files are identical, when echoing the array $lang[THIS_FILE] you get 'D'.
--------------------------------------------------------------------------------
Fatal error: Failed opening required 'languages/D/ubbthreads.php' (include_path='.:/usr/local/lib/php')
--------------------------------------------------------------------------------
Notice the D. that should read
'english'
echo $lang; #by itself, no array []
results in
Dnglish
If you go in to generic.php and change the last line to read something other than "Delete checked" , say "PHP" then the error lines reads
--------------------------------------------------------------------------------
required 'languages/P/ubbthreads.php'
--------------------------------------------------------------------------------
site 1 functions normally, site 2 functions normally, site 3 functions normally, site 4 has this error.
I can not get another instance to work at all. Not under a current url, not under a new url. Any thoughts or suggestions are appreciated. thanks
Array problems?
Moderator: General Moderators
I wonder if the problem is with the THIS_FILE constant. Maybe in old versions of PHP it is the same as __FILE__, which contains the name of the current file.when echoing the array $lang[THIS_FILE] you get 'D'
You might try changing the name of THIS_FILE to something like MY_FILE.
If that doesn't help, maybe it'll work if you use this kind of array structure:
Code: Select all
$lang = array(
THIS_FILE => 'english',
NEW_POST_ICON => "Post",
PREV_ICON => "Previous",
INDEX_ICON => "Index",
NEXT_ICON => "Next",
EXP_ICON => "Expand",
COL_ICON => "Collapse",
FLAT_ICON => "Flat",
THREAD_ICON => "Threaded",
EDIT_ICON => "Edit",
REPLY_ICON => "Reply",
FORUM_RETURN => "Return to Forum",
...
DELETE_CHECK => "Delete checked",
);Code: Select all
$langїTHIS_FILE] = 'english'you should quote the hashes i.e. $lang['THIS_FILE'] = 'english' (of course unless you've declared all those constants)