Advanced search  

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]

Pages: [1]   Go Down

Author Topic: 1.3.3 language flag bug ?  (Read 5737 times)

0 Members and 1 Guest are viewing this topic.

RaptorUK

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • F1 Album
1.3.3 language flag bug ?
« on: May 19, 2005, 09:11:32 pm »

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.
Logged

Nibbler

  • Guest
Re: 1.3.3 language flag bug ?
« Reply #1 on: May 19, 2005, 09:24:02 pm »

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

init.inc.php, find

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

and replace it with

Code: [Select]
$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;
}
}
Logged

RaptorUK

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • F1 Album
Re: 1.3.3 language flag bug ?
« Reply #2 on: May 19, 2005, 09:34:14 pm »

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
Logged

RaptorUK

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • F1 Album
Re: 1.3.3 language flag bug ?
« Reply #3 on: May 19, 2005, 09:40:09 pm »

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

Nibbler

  • Guest
Re: 1.3.3 language flag bug ?
« Reply #4 on: May 19, 2005, 09:42:31 pm »

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.
Logged

RaptorUK

  • Coppermine novice
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 45
    • F1 Album
Re: 1.3.3 language flag bug ?
« Reply #5 on: May 19, 2005, 09:58:48 pm »

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 ?   ???
Logged

Nibbler

  • Guest
Re: 1.3.3 language flag bug ?
« Reply #6 on: May 19, 2005, 10:16:29 pm »

That wouldn't have caused it.
Logged
Pages: [1]   Go Up
 

Page created in 0.018 seconds with 21 queries.