Well, I hate to say it, but I am getting the SAME error message (at least almost) and am totally befuddled by it. PLEASE HELP US!!! I feel really stupid!!!! Thanks!
Janey
Error message:
Parse error: parse error, unexpected T_ELSE in /home/content/.../html/moodle/lib/weblib.php on line 1203
Well I must be a champion of stupid, because I get heaps of error messages including parse error messages. I followed all the instructions for Windows and uploaded the easyphp program and then comes the hard bit of editing the config.php file. With absolutely no understanding of code writing I am not even sure where in the text the bits need to go but I thought i had done ok....and then...
Parse error: parse error, unexpected T_VARIABLE in c:\program files\easyphp1-7\www\moodle\config.php on line 104
Notice: Undefined variable: CFG in c:\program files\easyphp1-7\www\moodle\index.php on line 16
Warning: main(/course/lib.php): failed to open stream: No such file or directory in c:\program files\easyphp1-7\www\moodle\index.php on line 16
Fatal error: main(): Failed opening required '/course/lib.php' (include_path='.;C:\Program Files\EasyPHP1-7\php\pear\') in c:\program files\easyphp1-7\www\moodle\index.php on line 16
Is there someone out there who can put us out of our misery??? It would be greatly appreciated.
Everything should look like
$CFG->foo = 'bar';
NOT
CFG->foo = 'bar';
Also you need to make sure you have ; on the end of each line.
Also, strings all need to be quoted. So things like dbname, etc all need to have quotes
$CFG->dbname = 'moodle';
NOT
$CFG->dbname = moodle;
I noticed lots of miscellaneous parse errors discussed in the Moodle forum here and there, but few replies. It would be good for one of you Moodle experts out there to give us some general info on what these errors mean and how they should be fixed! Thanks.
Jim P.
if you get a parse error, post the exact error you get, along with the contents of the code that the parse error references (with a few lines either side)
so if it says
PARSE ERROR: expected T_ELSE on line 1100 of lib/weblib.php
post say, 5 or 10 lines on either side of 1100 here, with the exact wording of the error message and someone should fix it in cvs.