Jak Wyłączyć/włączyć logowanie https na VPS?


(michalmw) #1

Witam,

Mam problem z VPS. Po skonfigurowaniu i zainstalowaniu CMS w access.log mam nastepujący problem:

[Tue Nov 29 21:59:11 2011] [error] [client TUTAJ IP] PHP Notice: Undefined

 variable: HTTPS in /var/www/auction/includes/https.inc.php on line 33, referer:

 http://ADRESSTRONY/register.php

Zawartosć https.inc.php

<?#//v.3.0.0

//if(!defined('INCLUDED')) exit("Access denied");

#///////////////////////////////////////////////////////

#// COPYRIGHT 2004 Phpauction.org ALL RIGHTS RESERVED//

#///////////////////////////////////////////////////////


$R = @mysql_query("SELECT * FROM PHPAUCTIONXL_https");

if(!$R) {

	MySQLError($query);

	exit;

} else {

	$Https = @mysql_fetch_array($R);

}


if(($HTTPS == "on" || $HTTPS == "1") &&

(basename($_SERVER['PHP_SELF']) == "logout.php")) {

	return;

}


if((isset($_SESSION['PHPAUCTION_LOGGED_IN']) || isset($_SESSION["PHPAUCTION_ADMIN_LOGIN"])) && $Https['https'] == 'yes') {

	$SETTINGS['siteurl']=$Https['httpsurl'];

} elseif($Https['https'] == 'no') {

	$Https['httpsurl']=$SETTINGS['siteurl'];	

}#// Force SSL transaction if this is the sign up script.


if(!($HTTPS == "on" || $HTTPS == "1") && $Https['https'] == 'yes' &&

(basename($_SERVER['PHP_SELF']) == "login.php" &&

strpos($_SERVER['PHP_SELF'],"admin/"))) {

	$GOTO = $Https['httpsurl']."admin/".basename($_SERVER['PHP_SELF']);

	Header("Location: $GOTO");

	exit;

}

if(!($HTTPS == "on" || $HTTPS == "1") && $Https['https'] == 'yes' &&

(basename($_SERVER['PHP_SELF']) == "login.php" ||

basename($_SERVER['PHP_SELF']) == "register.php" ||

basename($_SERVER['PHP_SELF']) == "user_login.php")) {

	$GOTO = $Https['httpsurl'].basename($_SERVER['PHP_SELF']);

	Header("Location: $GOTO");

	exit;

}



?>

Chciałbym włączyć albo wylączyć to logowanie przez https poniewaz generuje mi to bardzo duża pętle w tym pliku ktory potem zajmuje wiele miejsca na dysku.

Prosze o pomoc.

Pozdrawiam


(GioWDS) #2

To nie problem z VPS czy jego konfiguracją a z skryptem w którym próbujesz użyć zmiennej niezadeklarowanej.