Header Problems

Header Problems

by Ross Campbell -
Number of replies: 7
I have installed a moodle server on members.lycos.co.uk. There is one slight problem which I suspect has to do with the way they have PHP configured.

At various times the page redirects to http:www.tripod.lycos.co.uk instead of going to the address which is called by moodle. I have discovered that this is caused by a double slash "//". So say the needed url was http://members.lycos.co.uk/username/moodle/index.php it in fact is sent as http://members.lycos.co.uk//username/moodle/index.php which redirects.

This happens when after logging in.

What I am looking for is some neat way to remove the // in the url or for some way to reconfigure php.

Average of ratings: -
In reply to Ross Campbell

Re: Header Problems

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Hmmm ... the only reason I can think of is that the double slash is in the $CFG->wwwroot definition within config.php. Have you checked for this? It should be:
$CFG->wwwroot = "http://members.lycos.co.uk/username/moodle";

If not this, then email me the URL: I'd like to see what's happening here.
In reply to Martin Dougiamas

Re: Header Problems

by Ross Campbell -
Dear Martin,

The assignment $CFG->wwwroot is $CFG->wwwroot = "http://members.lycos.co.uk/strion/moodle";
and is not the problem which seems to be with the PHP installation itself. They are using PHP4U which is based on PHP 4.1. I am looking for some work-around on the basis that it is PHP which is the problem and it is going to be difficult to get tripod-lycos to change it.

The URL is http://members.lycos.co.uk/strion/moodle.

Moodle is great - you are to be congratulated on what you have achieved.

Regards,

Ross Campbell
In reply to Ross Campbell

Re: Header Problems

by Martin Dougiamas -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Ah, I see it it now. Yes, they seem to be trapping and checking calls to header() that contain "location" lines, perhaps to stop people doing funny things with redirects on their service. sad

Yuk. Unfortunately I use these sorts of redirects all over the place in Moodle (eg after editing modules, making posts, etc) to save having "continue" buttons all the time.

It would be a hack, but one thing you could do is to look through the code for lines like:
  header("Location: $CFG->wwwroot");

and replace them with lines like:
  print_continue("$CFG->wwwroot");

which will print a "continue" button.
In reply to Martin Dougiamas

Re: Header Problems

by James Miller -
I was trying to get this working and noticed (at least in mysqladmin/sql.php) the header calls are:

header('Location: ' . $cfg['PmaAbsoluteUri'] . $goto); header('Location: ' . $cfg['PmaAbsoluteUri'] . str_replace('&', '&' $goto));


I'm still not getting lycos working. The standard .htaccess variable result in 500 errors.
In reply to James Miller

Re: Header Problems

by Paula de Waal -
Picture of Core developers Picture of Translators

It seems you are having the same problems i had with lycos (free account).

You have to upgrade the file login/index.php, whith the new one. You will find it in  CVS

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/*checkout*/moodle/moodle/login/index.php?rev=1.23

That will solve the redirection problem.

In reply to Paula de Waal

Re: Header Problems

by James Miller -
I'm not even getting to login..

Without an .htaccess defining short_open_tag I don't get to table creation and moodle'ness.

With an .htaccess with even just the short_open_tag defined I get an Internal Server Error.

I emailed the address listed but the mail bounced so.. I'm at a loss at this point.
In reply to Paula de Waal

Re: Header Problems

by jude payne -
Hi Paula, upgrading to the new login/index.php file did the trick for me! No more redirecting to the default Lycos/Tripod page, so thanks for that.