Oppps I broke messenger module

I have gibbon setup and live, and was trying to setup a second copy on a different server for testing of other features that we are currently not using. I went into what I thought was the testing database to change absoluteURL and the Base Path, to fir the backup server. I made the mistake of being logged into the wrong database. Once I realised I had changed the wrong DB i switched the values back. everything working fine untill we try to use the messenger system.

When we click the new message link we get a blank area below the menu see screenshot.

In the error logs it generates the following error (I’ve removed the IP in client for security]
[Tue Oct 18 11:31:54.241628 2016] [:error] [pid 1358] [client :42316] PHP Fatal error: Cannot redeclare getMessages() (previously declared in /var/www/funkygibbon.handsworthchristianschool.co.uk/public_html/modules/Messenger/moduleFunctions.php:51) in /var/www/funkygibbon.handsworthchristianschool.co.uk/public_html/modules/Messenger/moduleFunctions.php on line 51, referer: http://gibbon.handsworthchristianschool.co.uk/index.php?q=/modules/Messenger/messenger_manage.php


This is an interesting one…and I too have made the wrong database error once or twice.

/modules/Messenger/moduleFunctions.php is loaded up by index.php (via /functions.php I believe), in order to be used in getting the message count for the minorLinks icons at the top right of the screen. For some reason it is getting re-declared in /modules/Messenger/messenger_manage.php on your system, although looking at the code for that page I can’t see where that is happening.

Settings such as absoluteURL have their values cached for the entire login session of a user. Have you tried logging out and back in? And have you double checked that the values are correct? Finally, try uploading /modules/Messenger/messenger_manage.php from a fresh download.

Hope this helps!


OK so i’m guessing it was just a coincidence that this happened just after my DB mess up.

I’ve looked further and other things are busted. It appears that there are files missing from different places. If I was to look at doing a reinstall is there a way I can keep all the pupils/staff/parents/timetable/behaviour data etc whilst resetting all the settings.

I presume for starters I would need to backup only the relevant tables but what are these.

I’m going to fire up a second instance of it some where and try to transfer data, I will report back here if successful but any help in trying to maintain the data would be helpfull.

My other option would be to restore from a backup, but the last known working backup I have is now 2 days old so would lose data from the last 2 days which the staff here would not be happy with me about.


That is an odd coincidence, and I can’t think off the top of my head what has caused this. There are certainly no previous known incidents of this kind.

Yes, a clean install with certain data copied over would be best. Tables like gibbonPerson, gibbonFamily, gibbonCourse, gibbonSchoolYear, and those with relationships to these (e.g. gibbonFamilyAdult) are likely candidates, but I cannot give you a definitive list right now (due to time constraints). If you come up with a definitive list, do feel free to share it here.

Good luck, and let us know how you go.



Yea I’m not sure what has caused it and I’m trying to carry out some diagnostics on the server to see if anything else happened just prior to spotting the problems. My gut feeling is that it is a server issue rather than a gibbon issue.

I did a new install on a new server, after exporting the DB. I then changed the setting for absoluteURL and the Base Path in the .sql file to match the new server. Then deleted all the tables in the new DB and imported the sql file all working. Updated the dns to point to the new server hey presto seems to be working perfectly fine again.

Great work, and thanks for sharing the solution! Sounds like you have some serious system admin skills : )