Error during installation

Error during installation

by Brey H -
Number of replies: 5

After I installaed it using Fantasico.

Then when I tried to go onto the site I got this message:  

Parse error: parse error, unexpected $ in /home/halepet/public_html/courses/lib/moodlelib.php on line 3055

What does that mean?

Average of ratings: -
In reply to Brey H

Re: Error during installation

by Marcus Schubert -
Hi,

which version of moodle do you use and which version of PHP?
If you are using the 1.5 dev, try downloading again.

Marcus
In reply to Marcus Schubert

Re: Error during installation

by Brey H -

Hello,

It's version 1.4.1 it says. So, I dont understand what the problem is. Should I still try reinstalling it?

In reply to Brey H

Re: Error during installation

by Marcus Schubert -
Sorry for replying so late, but could you post some lines round 3055 from your  /home/halepet/public_html/courses/lib/moodlelib.php ? That would be great help to see, what the error really is.

PS: Try the new 1.4.4
In reply to Marcus Schubert

Re: Error during installation

by Brey H -

I first tried just going to that URL and it's a 404 so I went through the FTP control panel and got to the file from there but I'm not sure what I'm looking for, should I post that whole page? it's just the codes on the page.  On the moodle page of my fantastico thing it has this warning:


Warning: fread(): Length parameter must be greater than 0. in /tmp/cpanel.halepet.1110989866.4338 on line 1082

Sorry for all the trouble! any ideas?

In reply to Brey H

Re: Error during installation

by Brey H -

here's the code around line 3055

/// Given a list (eg a,b,c,d,e) this function returns

/// an array of 1->a, 2->b, 3->c etc

 

    $array = array_reverse(explode($separator, $list), true);

    foreach ($array as $key => $item) {

        $outarray[$key+1] = trim($item);

    }

    return $outarray;

}

 

function make_grades_menu($gradingtype) {

/// Creates an array that represents all the current grades that

/// can be chosen using the given grading type.  Negative numbers

/// are scales, zero is no grade, and positive numbers are maximum

/// grades.