4
Are you sure that $_SERVER['SERVER_PORT'] is set? Try echoing it out.
What's your server OS? PHP version? Webserver and version?
I am not an SSL expert and really don't know how it works, but you use the login.php that is in the xoops/extras folder, right?
How about defining a constant BEFORE including mainfile.php in that particular login.php? Something like
//new code
define("XOOPS_SSL", 1);
// path to your XOOPS main directory
$path = '/path/to/xoops/directory';
include $path.'/mainfile.php';
if (!defined('XOOPS_ROOT_PATH')) {
exit();
}
and then in your mainfile.php:
// to the following
if(defined(XOOPS_SSL) && XOOPS_SSL == 1) {
define('XOOPS_URL', 'https: //www.example.org');
} else {
define('XOOPS_URL', 'http: //www.example.org');
}
Oh - and you DO comment out ALL lines in this, right:
// In mainfile.php
// change this line
define('XOOPS_URL', 'https: //www.example.org');
as you cannot re-define a constant.