1.3.3 language flag bug ? 1.3.3 language flag bug ?
 

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Main Menu

1.3.3 language flag bug ?

Started by RaptorUK, May 19, 2005, 09:11:32 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RaptorUK

I have just upgraded from 1.2.2 to 1.3.3 reading and following all the instructions to the letter, except for backing up my MySQL database,  i wasn't sure how to do it so I took a chance.  Everything seems to be OK . . . I decided to have a look at the new Config options and turned on Display Language Flags   . . .  the flags are there but the link to a directory I don't have,  e.g. http://www.f1album.com/execscriptdir/php.cgi?lang=german   so I get a HTTP 500 error . . .   have I don't something wrong or is this a bug ?

thanks.

Nibbler

You have an unusual server setup, try this code change.

init.inc.php, find

$PHP_SELF = isset($HTTP_SERVER_VARS['REDIRECT_URL']) ? $HTTP_SERVER_VARS['REDIRECT_URL'] : $HTTP_SERVER_VARS['SCRIPT_NAME'];


and replace it with

$PHP_SELF = '';
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');
foreach ($possibilities as $test){
if (isset($_SERVER[$test]) && preg_match('/([^\/]+\.php)$/', $_SERVER[$test], $matches)){
$PHP_SELF = $_SERVER['PHP_SELF'] = $_SERVER['SCRIPT_NAME'] = $matches[1];
break;
}
}

RaptorUK

Hey,  thanks Nibbler,  quick and effective response   ;D   Welsh has a problem but I can live with that  :D  (Parse error: parse error, unexpected T_STRING, expecting ')' in /home/a/l/album/public_html/lang/welsh.php on line 808)  hell,  I might even be able to fix that myself . . .

Would you mind explaining in a sentence or 2 what the change has done,  I'm trying to learn as I go  ;D

RaptorUK

LOL, fixed the Welsh . . . line 808    'Wyt ti\\'n si      should be    'Wyt ti\'n si  I think . . .  ;D

Nibbler

The server variable $_SERVER['SCRIPT_FILENAME'] is supposed to hold the name of the file being run on the server ie index.php. Instead it has that incorrect path. What the new code does is try to find out the right value for the variable and correct it.

The welsh language file is missing a \, I will go correct it.

RaptorUK

Nibbler,

before I started the upgrade I renamed the V 1.2.2 README.html file to index.html so that users wouldn't get a blank/confusing page while I was doing the 1.2.2 to 1.3.3 upgrade . . .  this wouldn't have caused my issue would it ?   ???

Nibbler

That wouldn't have caused it.