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: Unexpected '|'  (Read 2968 times)

0 Members and 1 Guest are viewing this topic.

buddybuddha

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Unexpected '|'
« on: October 16, 2005, 05:17:56 am »

Ok sorry guys if Im posting about an error that shows up a lot.  I searched the forums for something similar but couldnt find a solution.

When I boot up my image gallery I get the following:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/buddybud/public_html/Version3/PhotoGall/include/init.inc.php on line 334

Line 334 is

include('include/select_lang.inc.php');

Also before this I had edited 332 to get rid of another error which probably caused the second error.

Line 332 is now

$CONFIG['lang'] = strtr($USER['lang'], '$/\:*?"'<>`|', '____________');

Ogain real sorry if this happened before.  Can anyone help me?
Logged

Nibbler

  • Guest
Re: Unexpected '|'
« Reply #1 on: October 16, 2005, 05:24:04 am »

You need to escape the single quote, ie

Code: [Select]
$CONFIG['lang'] = strtr($USER['lang'], '$/\:*?"\'<>`|', '____________');
Logged

buddybuddha

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Unexpected '|'
« Reply #2 on: October 16, 2005, 05:43:10 am »

Im still getting that line 334 error.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Unexpected '|'
« Reply #3 on: October 16, 2005, 11:14:06 am »

next time show us a few lines more of the code. That's easier then... and you need to escape the \ too

Code: [Select]
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>`|', '____________');
why not go back to the orig and tell us your initial error?

buddybuddha

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Unexpected '|'
« Reply #4 on: October 16, 2005, 08:53:29 pm »

I accidentally lost thhe oricinal and I cant find an archive dl for the 1.3.3 version of the software.

But the original error if my memory serves me correctly was unexpected '|' on line 32.

Heres lines 330-342

$USER['lang'] . '.php')) {
$CONFIG['default_lang'] = $CONFIG['lang'];          // Save default language
$CONFIG['lang'] = strtr($USER['lang'], '$/\\:*?"\'<>`|', '____________');
} elseif ($CONFIG['charset'] == 'utf-8') {
include('include/select_lang.inc.php');
if (file_exists('lang/' . $USER['lang'] . '.php')) {
$CONFIG['default_lang'] = $CONFIG['lang'];      // Save default language
$CONFIG['lang'] = $USER['lang'];
}
} else {
unset($USER['lang']);
}

Logged

Tranz

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Female
  • Posts: 6149
Re: Unexpected '|'
« Reply #5 on: October 16, 2005, 09:15:17 pm »

Is there a reason you must use 1.3.3? You should upgrade to 1.3.5 to fix some security issues. Let's see if this also solves your problem.
Logged
Pages: [1]   Go Up
 

Page created in 0.017 seconds with 15 queries.