incorrect links displayimage.php incorrect links displayimage.php
 

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

incorrect links displayimage.php

Started by edgey8843, April 07, 2006, 02:15:18 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

edgey8843

got it loaded ok on two difrent servers but seem to have incorrect links on the forward backward buttons above the pictures
http://www.branshaw.no-ip.com/cpg144/displayimage.php?album=random&cat=0&pos=-10  if you try you will see what I mean. If you place mouse over arrow it returnes full machine path not the server path any Idea's on where to look to correct problem.

Nibbler

Look at phpinfo.php, find the server var that contains the correct value, and then place it first in the list in include/init.inc.php

$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');

edgey8843

looked at phpinfo.php but cannot see any reference to server var

kegobeer

edgey, you misunderstood Nibbler's request.  Point your browser to phpinfo.php and find the server var that contains the correct value.
Do not send me a private message unless I ask for one.  Make your post public so everyone can benefit.

There are no stupid questions
But there are a LOT of inquisitive idiots

edgey8843

soz I know that not thinking have all the info up but not certain what I should be looking at various paths am I looking under PHP Variables which section. have been through php ini manually but couldn't see anything wrong

Joachim Müller

Quote from: edgey8843 on April 07, 2006, 04:01:36 PM
have been through php ini manually but couldn't see anything wrong
you're not suppossed to. Re-read above recommendations.

edgey8843

left this Friday just not thinking straight have now re read and under stood have tried various variables at beginning of the code
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL',

'SCRIPT_NAME','SCRIPT_FILENAME');
FOR EXSAMPLE $possibilities = array('HTTP_HOST', 'REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL',

'SCRIPT_NAME','SCRIPT_FILENAME');
no matter what no diffrence rem ing that line seems to make it work or certainly work beter I have tried removing lets say redirect_urljust to see the difference removing something from this line of code does but that makes no difference only removing the complete line helps

Nibbler

If you post the relevent part of your phpinfo then we can help you.

edgey8843

have attached the copy of init.inc.php as a txt file this has the line remed if you check http://www.edgey.no-ip.com/cpg144/ you can see how this works better compared to the one at http://www.branshaw.no-ip.com/cpg144/index.php with the line of code still in place this affects the slide show button and previous next photo arrows in displayimage.php

Nibbler

If you post the relevent part of your phpinfo then we can help you.

edgey8843

$PHP_SELF = '';
$ORIGINAL_PHP_SELF = $_SERVER['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;
  }
}

this is at edgey.no-ip.com with line remed and works better than with line in though you have to click on at least two diffren pictures.

Joachim Müller

if you don't do as Nibbler suggested, then there's nothing we could do to help you. What part of the sentence
Quote from: Nibbler on April 08, 2006, 02:16:34 PM
If you post the relevent part of your phpinfo then we can help you.
do you not understand?