Slideshow problems due to PHP_SELF = REDIRECT_URL assignment Slideshow problems due to PHP_SELF = REDIRECT_URL assignment
 

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

Slideshow problems due to PHP_SELF = REDIRECT_URL assignment

Started by onkeljossip, March 23, 2004, 08:42:43 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

onkeljossip

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


$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)

bombo

is there a reply somewhere for that ? it will help me aswell... thanks


bombo