I'm using on the debian packaged moodle (from testing) on a debian stable server.
I've set everything up and enabled SSL on the server with the idea of forcing logins down https. However, I had not yet enabled it. In the meantime I found config.php (GCD Moodle » Administration » Configuration » Variables) to be dreadfully slow. It would get almost the entire page laoded and then everything would pause. The site would be inaccessible from elsewhere during this time.
I tracked it down to line 155:
if ((($fh = @fopen($httpsurl, 'r')) == false) and ($config->loginhttps == 0)) {
where the fopen seems to take ages and presumably times out after some minutes. It seems to me firstly that this would be better if the two clauses were reversed, ie that it checks if it's already enabled first and then doesn't bother to try the fopen if https is enabled.
Beyond that though, does anyone know why the fopen should be so slow? I can go to the url in question without any delay at all.
Thanks,
Gavin