forum.coppermine-gallery.net

Support => Older/other versions => cpg1.2 Standalone Support => Topic started by: onkeljossip on March 23, 2004, 08:42:43 pm

Title: Slideshow problems due to PHP_SELF = REDIRECT_URL assignment
Post by: onkeljossip on March 23, 2004, 08:42:43 pm
Hi folks,
I wasn't able to start a slideshow or browse to the next image whenever I accessed a random image from my gallery startpage.

I've looked into the code and found the following cause:

In init.inc.php the variable PHP_SELF is assigned as

Code: [Select]

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


Problem is that on my provider's server (Apache 1.3.19, PHP 4.1.2), REDIRECT_URL always points to the php script URL INCLUDING the HTTP-GET variables.  SCRIPT_NAME has the correct value but never gets used because REDIRECT_URL is already defined.

Example:

$PHP_SELF =  /pixies/displayimage.php?album=random&cat=&pos=-26
instead of the desired
$PHP_SELF =  /pixies/displayimage.php

(I've checked other servers on the web and they don't include the HTTP-GET variables in the REDIRECT_URL string. Lucky them.)

Could someone explain the reason why REDIRECT_URL is being used for PHP_SELF and not just SCRIPT_NAME?
I thought that REDIRECT_URL is just for error handling purposes.

Any insight is greatly appreciated!

Cheers,
onkeljossip (a very happy coppermine user)
Title: Re: Slideshow problems due to PHP_SELF = REDIRECT_URL assignment
Post by: bombo on March 27, 2006, 09:45:53 am
is there a reply somewhere for that ? it will help me aswell... thanks
Title: Re: Slideshow problems due to PHP_SELF = REDIRECT_URL assignment
Post by: Nibbler on March 27, 2006, 01:50:16 pm
Update your gallery.
Title: Re: Slideshow problems due to PHP_SELF = REDIRECT_URL assignment
Post by: bombo on March 27, 2006, 03:15:18 pm
thanks but finally my problem was different sorry
http://forum.coppermine-gallery.net/index.php?topic=29639.msg137194#msg137194
but you do not support coppeminevis :'(