Moodle worked perfectly on my Mac mini (Mac OS 10.3.9 and Moodle version 1.4.2). After upgrading to Moodle version 1.4.5, my forums ceased to function - returning blank pages more often than not. So, I decided to upgrade to Moodle 1.5.
Fortunately, I've made the attempt on my home 'network' so as not to impact my students because it has been a nightmare - consistently resulting is a site that doesn't function.
Basically, after following the upgrade instructions (and successfully updating the databases), I can no longer login to my site. I'm consistently told that I can't login because "cookies are currently not enabled in your browser". I get the same message with Safari, IE and Foxfire - and cookies are enabled in each case.
If I restore from my backup of the old site, I can again get everything (except forums) to work just fine.
I'm using WebSTAR 5.4, PHPStar 3.0, Mac OS 10.3.9 and constant prayer.
If I could fix the blank page forum problem, I'd be OK - although being able to upgrade would be nice.
Any suggestions would be appreciated.
Thanks.
Jim Hardy
Professor of Chemistry
The University of Akron
http://ull.chemistry.uakron.edu
At least I found a work around for the blank forum pages. First, it seems that only the latest post can be displayed. However, I found the option to have all forum posts emailed to all course members. Not the best solution but at least one that my students can use.
I still hope that someone can suggest what I can try to solve the cookie problem since I'd really like to be able to upgrade.
I would conjecture that you haven't gotten any replies because very few people are using that specific software configuration.
Unless you have an utterly compelling reason for sticking with WebStar, I'd suggest ditching it and going to standard Apache/PHP/MySQL.
Edit: no disrespect toward WebStar implied; we used to have some Mac OS 8/9 servers running WebStar, and they were quite solid. Nevertheless, not many people use it as a web server with OS X. You'll probably have better luck getting help if you switch to Apache.
And I'm not the only Martin around here using OSX ;) Martin Dougiamas recently upgraded his Powerbook -- which outshines Penny's PB and mine! It has one of those keyboards that glow in the dark. Outrageous.
The bottom line is: Moodle runs very well on OSX. As Tony mentions, WebStar isn't very compelling... nor popular. But you probably have good reasons to run it. PHP is probably finding some problem/failure. When this happens, PHP always reports the problem to a logfile, with a diagnostics message.
If you can find those diagnostic messages (and post them here) we'll probably be able to help Probably the WebStar documentation has something about "error logs", warnings, error messages, etc.
However, I doubt that the problem has anything to do with WebSTAR - or running on a Mac for that matter.
Through Moodle version 1.4.2, all worked as advertised (except the ability to upload personal images.)
With version 1.4.5, the forums got odd. Only the last post can be viewed AND only by the person who made the post. Any others come up blank. Fortunately the cron.php file will, among other things, email all course members with any posts each day.
When I upgraded to 1.5 (stable), then it became impossible to login. Oh, I could get the databases to update and everything was listed as successful. However, when trying a normal login, I keep being told that I don't have cookies enabled - which is untrue. I get exactly the same effect on three Mac browsers and even IE and Netscape on a WinDOZE box.
I made no upgrades to PHP, MySQL or WebSTAR - just moodle. It has to be a problem with the login routine.
Still, I tried an experiment with my nonfunction 1.4.5+ forums. Since I couldn't locate where the PHP error log was, I took a different approach. Near the start of the file
/mod/forum/discuss.php, (after the phplib was loaded) I added a phpinfo(); line.
Up popped the complete PHPInfo display and then at the very bottom - there was the forum post - properly formatted. Every forum post could be displayed. Of course, it's not a solution.
So, how could inserting a single phpinfo(); line have that effect?
Have you tried looking at the same page with other browsers? Some are more forgiving of HTML errors than others.
Thanks, from the posts, it still looks like a problem with Moodle 1.5
Hmmm. I suspect a permission issue -- make sure the folder where Moodle is set to has "Others->Read only".
Did you try to get to the error logs? Webstar and PHP are certainly logging the problem somewhere. If you can find those logs, then we'll be able to help. The Webstar documentation will probably tell you where to find them.
PHP Warning: Cannot modify header information - headers already sent by (output started at /login/index.php:24) in /lib/moodlelib.php on line 2130
The line 2130 alternates with line 2131.
This is for my moodle 1.5 installation where I can't get past the login window because it claims my browser isn't set to accept cookies - the same three browsers were tried.
I do get "Expires: Acept-Ranges: none" that shows up at the top of the login page.
Oddly, I attempted to include the config.php file within the body of this message and it would never show up. When I went to edit the post, the information was there. Odd. I've attached it this time.
Try to use a unixy editor (vi, emacs, nedit, etc) rather than a native mac editor to remove it.
https://webwork2.math.ohio-state.edu/configcheck.php
can be used to check a Moodle site for trailing newlines.
I can't used the configcheck.php routine because my test site is on my home local net.
-unless it's just my copy that ended up with the carriage return somehow.......
Thanks.
Here is the Moodle 1.5 HTTP header on my web server:
Date: Mon, 27 Jun 2005 02:02:48 GMT
Server: Apache/1.3.31 (Unix) PHP/4.3.8 mod_perl/1.29 mod_ssl/2.8.19 OpenSSL/0.9.7a
X-Powered-By: PHP/4.3.8
Set-Cookie: MoodleSession=a1141372f2c092efba8baa93b9a57c9b; path=/
Expires:
Cache-Control: private, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Set-Cookie: MoodleSessionTest=fhHPv1V4zh; path=/
Set-Cookie: MOODLEID_=deleted; expires=Sun, 27-Jun-2004 02:02:47 GMT; path=/
Set-Cookie: MOODLEID_=%25ED%25C3%251CC%25B7d; expires=Fri, 26-Aug-2005 02:02:48 GMT; path=/
Accept-Ranges: none
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
Contrast this with the Moodle 1.4 HTTP header on my web server:
Date: Mon, 27 Jun 2005 02:03:40 GMT
Server: Apache/1.3.31 (Unix) PHP/4.3.8 mod_perl/1.29 mod_ssl/2.8.19 OpenSSL/0.9.7a
X-Powered-By: PHP/4.3.8
Set-Cookie: MoodleSession=fb477851628afb37be0fd7fdcfdad23f; path=/
Expires:
Cache-Control: private, pre-check=0, post-check=0, max-age=0
Pragma: no-cache
Accept-Ranges: none
Transfer-Encoding: chunked
Content-Type: text/html; charset=iso-8859-1
What is happening is that WebStar is confused by the more complicated Moodle 1.5 header and is sending its own default header on top of the Moodle 1.5 header. This causes the Moodle header to appear in the body of the web page, mucking things up. [This causes the headers already sent error message.]
Note that WebStar is sometimes also confused by the Moodle 1.4 HTTP headers. Here is a case in point:
http://classroom.chemistry.uakron.edu/filter/tex/texdebug.php
Click on Show Image and you will see what I mean.
Re: Unable to upgrade to Moodle 1.5 on a Mac
output_buffering = Off
to
output_buffering = On
(Or add this line if there isn't any mention of output_buffering in php.ini).
Remember to restart your web server after making this change.
output_buffering = 4096
I changed it to
output_buffering = On
No luck, same result.
I really appreciate your suggestions and help. Off hand, how would I go about testing your theory about the headers being too complex?
output_buffering = Off
Also you might use the following PHP script:
<?PHP
header("Set-Cookie: MoodleSession=a1141372f2c092efba8baa93b9a57c9b; path=/");
header("Expires:");
header("Cache-Control: private, pre-check=0, post-check=0, max-age=0");
header("Pragma: no-cache");
header("Set-Cookie: MoodleSessionTest=fhHPv1V4zh; path=/");
header("Set-Cookie: MOODLEID_=deleted; expires=Sun, 27-Jun-2004 02:02:47 GMT; path=/");
header("Set-Cookie: MOODLEID_=%25ED%25C3%251CC%25B7d; expires=Fri, 26-Aug-2005 02:02:48 GMT; path=/");
header("Accept-Ranges: none");
header("Content-Type: text/html; charset=iso-8859-1");
echo "Testing Header";
?>
Save this somewhere in a file testheader.php where your web server can see it and try viewing it. [Make sure that "<?PHP" is the first line and "?>" is the last line in the file.] You should only be seeing the line "Testing Header". If my hypothesis is correct however, you should be seeing some header junk on top of the "Testing Header". Then try commenting out the various Set-Cookie lines and repeat the experiment until the header junk disappears. (Note that the MoodleSession cookie is required for Moodle to work, but the other cookies are not really necessary.)
I tried your testheader.php program and got the following.
Expires: Cache-Control: private, pre-check=0, post-check=0, max-age=0 Pragma: no-cache Set-Cookie: MOODLEID_=%25ED%25C3%251CC%25B7d; expires=Fri, 26-Aug-2005 02:02:48 GMT; path=/ Accept-Ranges: none Content-Type: text/html; charset=iso-8859-1 Testing Header
Unfortunately, I need to go and teach class so need to get going.
One question though. If removing the unneeded cookies works, do you know what I need to change to fix the problem?
Thanks again.
As for disabling the extra Moodle cookies, you would need to do the following. In lib/moodlelib.php comment out the following lines:
//setCookie($cookiename, '', time() - HOURSECS, '/');
//setCookie($cookiename, rc4encrypt($thing), time()+$seconds, '/');
and also add the following line indicated in red:
function get_moodle_cookie() {
global $CFG;
return 'somebody';
Then in lib/setup.php comment out the following line:
//setcookie('MoodleSessionTest'.$CFG->sessioncookie, $_SESSION['SESSION']->session_test, 0, '/');
and change the line
if ($SESSION != NULL) {
to
if (0) {
Be sure to keep backups of both moodlelib.php and setup.php
I still get "Expires: Accept-Ranges: none" at the top of each page but everything else appears to function as expected.
Now I'll post the issue on the WebSTAR list and see what they have to say.
Thanks.
You can fix that too by commenting out the lines
// @header('Expires: ');
// @header('Accept-Ranges: none');
in lib/weblib.php
We have a number of Macs running 1.5 here. In fact most of my programmers use macs, but they are all run the apache that comes built into Mac OS X (they're all running panther now), not WebSTAR.
So I would say the problem is most likely something odd going on with WebSTAR, my guess would be something odd about how it handles sessions.
Attaching a copy of your phpinfo print out might help debug the problem.
I just don't see how WebSTAR can be the problem. It and moodle 1.4.2 functioned flawlessly. Moodle version 1.4.5 introduced problems with forums displaying blank pages and now verrsion 1.5 won't allow anyone to login. In all cases, the version of WebSTAR has remained the same (5.40.)
My moodle related site is only part of what my web server offers. I cringe at the thought of needing to convert about 100000 pages just to use Apache in the hope that it will make moodle happy.
My bet/hope is that there is a simple fix to moodle that we simply haven't found yet. Afterall, there appear to be many other Mac OS X users experiencing similar problems.
Then again, maybe there is a way of getting a copy of moodle 1.4.2 and just forgetting about upgrades. At least it worked with no significant problems.
There were a lot of new security features in 1.4.5, too. Maybe something to do with sessions?
Really I don't think that the problem is at the web server.
Thank you.
Listen 8080
instead of the default
Listen 80
You can then access the Apache server by adding ":8080" to the base url of wwwroot in your config.php:
http://example.com:8080/moodle
Again, thanks for your help.