Exception while tryinng to access Logs.

Exception while tryinng to access Logs.

Dublin Design發表於
Number of replies: 3

I am getting error while trying to access Site Administration > Reports > Logs. After clicking [Get these logs] red alert appears:

Exception - Call to a member function close() on array

It also shows links to empty help page (https://docs.moodle.org/37/en/error/moodle/generalexceptionmessage)

This is new Moodle 3.7.1 installation with 15GB data migrated from 2.3 version.
Shared Linux hosting, PHP 7.2.18 and MySQL 5.6.33

I tried with various Log options (for single day, singe user or course) and it is still the same. I can't remember if I ever checked Logs before so I can't say if it worked before. Live Log option shows nothing, no error there tho. I tried to google the error but can't find anything?

Help!


評比平均分數: -
In reply to Dublin Design

Re: Exception while tryinng to access Logs.

Ken Task發表於
Particularly helpful Moodlers的相片

 A couple of things stand out ...

"migrated from 2.3 version"

I take it that was done in stages and along the way an environment check was done ... any potential issues (yellow) were checked and corrected before making the next hop.

The second ... "Shared Linux hosting" which translates to me, you may not have full run of server and might not be able to tweak things ... especially upwards.

Got command line?

What shows from running scripts in moodlecode/admin/cli/

php mysql_compressed_rows.php -i

above is a lower case I ... 'eye'

and the following ... a lower case 'L'

php mysql_compressed_rows.php -l

Was "15GB data migrated" the sql dump?

So the issue is logs ... Question ... how important is keeping old logs?

The table involved is usually the largest table in any version of moodle.  If one migrated from a server that wasn't shared, it might have had enough 'umph' to handle that large table.

mdl_logstore_standard_log

Now after all that, here's the suggestion ... assuming the answer is not that important ...

truncate the mdl_logstore_standard_log table ... keep it's structure ... it will be like the version of moodle you have now was initial install and the 'who done it' tracking will begin a new.

OR

Remove rows from same table that are before the date the server was migrated.

'SoS', Ken


In reply to Ken Task

Re: Exception while tryinng to access Logs.

Dublin Design發表於
Hi Ken,

Just to be more precise - I moved courses manually from old Moodle to new one (v.3.7.1). It is 17GB big moodledata just to indicate it is not fresh empty installation. It is hosted shared linux server with limited access - I would love to have cloud or on-site dedicated server but it is what it is.

As this is 2 month old installation mdl_logstore_log is only 3600 records long - compare to mdl_log on old moodle having over 255k records - so I am surprised with error while trying to access logs in new moodle.

My problem is I have no idea where "Exception - Call to a member function close() on array" comes from. I tried google it but I can't see any slightest clue. I deployed hosting tools to check my database and it is all fine. I am about to go thou server logs to see if I can find anything there but I appreciate if you have any suggestions?





In reply to Dublin Design

Re: Exception while tryinng to access Logs.

Ken Task發表於
Particularly helpful Moodlers的相片

Still think a shared hosting issue ... as it also means shared DB server which you can't tweak if needed ... it is what it is.

Truncating all the table ... heck with data as site is broke when it comes to looking at logs in Moodle Admin UX!

What's in config.php for dbcollation matches the collation of database and all tables in the DB.

I too cannot find where "Exception - Call to a member function close() on array" comes from.  Not ever had the problem from what I can re-call.

But then again ... I don't host on shared.

"deployed hosting tools to check my database" .... and hosting tools are?  phpmyadmin? other?  Character set, collations of DB + all tables ok?

Out of ideas! :|

'SoS', Ken