Advanced search  

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Pages: [1]   Go Down

Author Topic: incorrect links displayimage.php  (Read 5616 times)

0 Members and 1 Guest are viewing this topic.

edgey8843

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
incorrect links displayimage.php
« on: April 07, 2006, 02:15:18 pm »

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

Nibbler

  • Guest
Re: incorrect links displayimage.php
« Reply #1 on: April 07, 2006, 02:28:05 pm »

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

Code: [Select]
$possibilities = array('REDIRECT_URL', 'PHP_SELF', 'SCRIPT_URL', 'SCRIPT_NAME','SCRIPT_FILENAME');
Logged

edgey8843

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
Re: incorrect links displayimage.php
« Reply #2 on: April 07, 2006, 03:38:23 pm »

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

kegobeer

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 4637
  • Beer - it does a body good!
    • The Kazebeer Family Website
Re: incorrect links displayimage.php
« Reply #3 on: April 07, 2006, 03:41:30 pm »

edgey, you misunderstood Nibbler's request.  Point your browser to phpinfo.php and find the server var that contains the correct value.
Logged
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

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
Re: incorrect links displayimage.php
« Reply #4 on: April 07, 2006, 04:01:36 pm »

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
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: incorrect links displayimage.php
« Reply #5 on: April 07, 2006, 04:39:13 pm »

have been through php ini manually but couldn’t see anything wrong
you're not suppossed to. Re-read above recommendations.
Logged

edgey8843

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
Re: incorrect links displayimage.php
« Reply #6 on: April 08, 2006, 12:56:29 pm »

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

'SCRIPT_NAME','SCRIPT_FILENAME');
FOR EXSAMPLE
Code: [Select]
$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
Logged

Nibbler

  • Guest
Re: incorrect links displayimage.php
« Reply #7 on: April 08, 2006, 01:14:45 pm »

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

edgey8843

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
Re: incorrect links displayimage.php
« Reply #8 on: April 08, 2006, 01:26:58 pm »

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
Logged

Nibbler

  • Guest
Re: incorrect links displayimage.php
« Reply #9 on: April 08, 2006, 02:16:34 pm »

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

edgey8843

  • Coppermine newbie
  • Offline Offline
  • Posts: 7
    • Mick's Homepage
Re: incorrect links displayimage.php
« Reply #10 on: April 08, 2006, 02:28:07 pm »

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

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: incorrect links displayimage.php
« Reply #11 on: April 09, 2006, 10:35:57 am »

if you don't do as Nibbler suggested, then there's nothing we could do to help you. What part of the sentence
If you post the relevent part of your phpinfo then we can help you.
do you not understand?
Logged
Pages: [1]   Go Up
 

Page created in 0.019 seconds with 20 queries.