Many Problems with 3.2.2 Build 20170313

Many Problems with 3.2.2 Build 20170313

by Donna Lee -
Number of replies: 17

First error that started appearing was the Undefined. Then, it started throwing 500 Internal server errors. Then, error writing to database. These are all random and don't happen all the time. I have added classes, forums, forum posts, glossaries, glossary entries and have been successful at some entries, so I know it's not a path issue or an install error of any kind. 

One other very annoying problem is every update or addition to the site is extremely slow. I know it's not a performance issue of my server. It definitely has to do with this version of moodle.

Just confirmed another error of users having their password not work each time they come to the site. They have to click forgot password and set up a new one each time they come to the site. I verified this with at least two users.

This is a fresh install and not an upgrade. I have two other moodle sites that I installed and manage and they are all running perfectly without problems on the same server setup. They are version 2.9 and 3.0.7 20160114

For this fresh install of 3.2.2, my server environment checks out all okay. Do you guys know if there is any resolution to these bugs at all? I'd hate to erase the entire site and go back to a lower version. Does 3.3 resolve any of these issues?

Server checks


NameInformationReportPluginStatus
moodle
version 2.7 is required and you are running 3.2.2 (Build: 20170313)
OK
unicode
must be installed and enabled
OK
databasemysql (5.5.54-cll)
version 5.5.31 is required and you are running 5.5.54
OK
php
version 5.6.5 is required and you are running 5.6.30
OK
pcreunicode
should be installed and enabled for best results
OK
php_extensioniconv
must be installed and enabled
OK
php_extensionmbstring
should be installed and enabled for best results
OK
php_extensioncurl
must be installed and enabled
OK
php_extensionopenssl
should be installed and enabled for best results
OK
php_extensiontokenizer
should be installed and enabled for best results
OK
php_extensionxmlrpc
should be installed and enabled for best results
OK
php_extensionsoap
should be installed and enabled for best results
OK
php_extensionctype
must be installed and enabled
OK
php_extensionzip
must be installed and enabled
OK
php_extensionzlib
must be installed and enabled
OK
php_extensiongd
must be installed and enabled
OK
php_extensionsimplexml
must be installed and enabled
OK
php_extensionspl
must be installed and enabled
OK
php_extensionpcre
must be installed and enabled
OK
php_extensiondom
must be installed and enabled
OK
php_extensionxml
must be installed and enabled
OK
php_extensionxmlreader
must be installed and enabled
OK
php_extensionintl
should be installed and enabled for best results
OK
php_extensionjson
must be installed and enabled
OK
php_extensionhash
must be installed and enabled
OK
php_settingmemory_limit
recommended setting detected
OK
php_settingfile_uploads
recommended setting detected
OK
php_settingopcache.enable
recommended setting detected

Average of ratings: -
In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Ken Task -
Picture of Particularly helpful Moodlers

Suggest turning on debugging on the fresh install to see what it might report.

Also check apache error logs for clues ... any 'server has gone away' or other?

Running 3 instances of Moodle on a single server must mean you have a standalone or a dedicated VPS.   So a little info about the server itself would help.   Operating system is?  How hosted?

I'd say that if one is having issues with fresh 3.2.2 inarLL an upgrade to 3.3 may not be the answer ... could be making a situation worse if the other sites on server are now experiencing issues.

'spirit of sharing', Ken



In reply to Ken Task

Re: Many Problems with 3.2.2 Build 20170313

by Donna Lee -

Hi Ken,

Thanks so much for your willingness to help. The other two sites I have are working perfectly. No errors like this at all.  (Just started errors on the main site.)

I did turn on debugging. I'm embarrassed to say I don't know where to find the error log.

The server is a Godaddy VPS  running Apache/2.2.32 

Another weird thing is, the new site is taking up 4439MB. Something is not right. One other site I have is only 3884MB and it is full of content and users and has a years worth of content. This new site has hardly any content and only 14 users that I had just navigating through it to test it out. I'm trying to figure out where it's been bloated out so much.

There's something that is giving me some clues as to what might be wrong. I might have done something really stupid and that is that I have one instance of moodle in the home directory and another instance in a subdirectory. I wanted to do it this way, so that when I took the current site I have up down and replace it with the new one, I was not going to have to change the URL.

I have one instance at mysitename.com and the new install at mysitename.com/learningcenter.

Now, my main site that I've had up for a year is starting to throw errors. It went to a debug screen and I don't have debug turned on in that instance. I only have it turned on in the new install. But, the main one threw this message: 

Fatal error: Out of memory (allocated 2883584) (tried to allocate 39200 bytes) in /home/myhomedirectory/public_html/lib/setup.php on line 594


In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Donna, I have a GoDaddy VPS with Moodle 3.2.2+ running on it, no problems.

Ken is much better at these things, so take his advice.

In your Moodle 3.2.2, go to Site Admin | Development, and clear the caches.  Are you running Opcache?  I always wonder what would happen if I had two Moodles pointing to the same disk cache?  Ken might know.

From what I can tell (du - s moodle), my moodle takes up only around 200MB). Or do you mean your moodledata folder?

There are other ways to do the migration.  Yes, putting one moodle in another could be causing problems, and making matters worse.  I have several moodles on my VPS, but they are each in their own folder.  Also, my main moodle is in its own folder, so I tell students to go to my domainname.com/moodle.  But this is me, and your method could work.  But you might want your new moodle in its own subdomain, just to keep it separate.  Do you have two moodledata folders to keep the data separate?  Also two mysql databases?  I am rambling, I will stop.

As you progress, consider making a backup of your production moodles.  You are doing backups, right?

Let's see what Ken says to get yourself cleaned up.  I will watch and add my 2 cents (US).

In reply to Rick Jerz

Re: Many Problems with 3.2.2 Build 20170313

by Donna Lee -

Rick, LOL You're not really rambling. Thank you for helping.

I wonder if I uninstall the new instance if that will affect my current and main site. I am thinking of doing this, but now I'm afraid.

I did set up two different databases and two totally different moodledata folders and set their paths. I'm wondering if there is more than one place to tell moodle to point to the database.

I want to do what you suggest. Actually, I want to delete it out all together and just create a new server account, new URL and keep it totally separate. I wish I would have done this from the beginning - IF this is the problem.

The thing is, in the main/current site, I left the data folder where it comes installed in moodle (public_html/data). With the new site, I created the data folder in the home directory outside of public_html like it has been suggested. I'm not even sure if this is an issue anyway.

I have to do something quick though. I took the main site down because it started throwing errors. I need to either figure this out or uninstall asap.

PS - I am doing backups. 

In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Donna, yep, you might have created your own problems in the way that you installed your last Moodle.  Ken's post below is helpful.  The problems that you are having have more to do with the way you installed your last moodle, and not with GoDaddy, I believe.

I have never in the 8 years of running Moodle on various GoDaddy servers run into the "out of memory" error that you encountered.  Right now, my Moodle is on a 3GB GoDaddy VPS.  About two years ago, I was running on a 2GB VPS.  In neither case did I run out of memory.

Since your last moodle install was "experimental," I would uninstall it (very carefully, so as to not damage your production moodle.) My approach would be to delete the folder mysitename.com/learningcenter, then delete the moodledata folder associated with this install, then delete the database.  Then I would do a Site Admin | Development, Clear Caches.  See if your production moodle settles down.  Oh, reboot your server, too.

I am not sure how you have your second moodle set up, and whether it is causing problems.

Many of these VPS and hosted servers provide for hosting multiple domains on the same VPS/hosted server.  But you have to know a little about how to do this.  On should be able to have a VPS setup something like the following:

..public_html/moodle1, moodledata1, MySQLDB1, www.domainname1.com

..public_html/moodle2, moodledata2, MySQLDB2, www.domainname2.com

..public_html/moodle3, moodledata3, MySQLDB3, www.domainname3.com

I host multiple domain names on my low cost GoDaddy hosted server, and it works well.  I have not found a need to do this with my VPS.  I prefer to put my production moodle into its own folder and to not make my moodle be my main domain (see this example.)  But this is just the way my (old) brain works.  I also have my other older moodles installed on this same VPS, as in this example, just in case I want to get to some of my older data.

It is never recommended to have your moodledata folder in your public_html folder.  I think that it is your production moodle that has your data folder in the wrong place.  I suspect that you did this install with a one-click installer, which usually gets this wrong.

Well, you have backups.  I assume that you have the database, moodledata, and moodle itself backups.  Try to reverse (remove) what you did with your last moodle install.  That's what I would do.

Going forward, I suggest having a duplicate experimental server.  This could be with a hosting company, or on your local computer.  I have my experimental servers on my Mac (via MAMP).  It closely mirrors my production server.  I always experiment first with my MAMP, then apply then changes on my production site.  One example of what I did a 1 1/2 years ago was to get my newest moodle 3.0 set up on my MAMP server.  Everything!  Courses, settings, theme, etc.  Then I moved this MAMP install over to my GoDaddy VPS.  I installed Moodle 3.0 on my GoDaddy VPS, then moved the moodledata and MySQL database to this new install on GoDaddy.  Worked perfectly.  Even when I want to upgrade my production moodle, I first do the upgrade on my MAMP first.

There are many ways of setting up moodle, so my method is only one.  You wanted three moodles on the same server, definitely doable, but you have to think carefully.  I run a somewhat small moodle, about 15 courses a year, about 400 students each year.  My guess is that your moodle is much bigger.

One last thought just hit me... Are you doing all of these installs with the one-click install utility, or are you manually doing these installs from scratch?  I hope that your answer will be manually, otherwise the obvious problem will be with the one-click install software.

(Ken, did I come close to some good suggestions for Donna?)


In reply to Rick Jerz

Re: Many Problems with 3.2.2 Build 20170313

by Ken Task -
Picture of Particularly helpful Moodlers

We'll know when Donna replies. ;)

Out of memory is related to php settings ... amount of memory a script can consume.

'spirit of sharing'. Ken

In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Ken Task -
Picture of Particularly helpful Moodlers

Since Rick host with GoDaddy (I don't) ... it's Rick that should advise ... and I'll add 2 cents from time to time ... 

Here's the first of 2 cents ...

Debugging displays to the moodle screen ... on most systems ... GoDaddy?

The one message you are seeing ...

"Fatal Error: Out of memory (allocated 2883584) (tried to allocate 39200 bytes)"

Rick should be able to provide exactly what you need to do since he host with GoDaddy.

Since you've invested time and have a working site, think I'd keep that one and dump the new until one learns the GoDaddy System more.   The config.php file of the new one should have paths to code and to the data directory (make sure the data directory isn't the one used for your main/was working site). 

Maybe you could provide screen shots of files?   GoDaddy does have an icon for browsing files and you could use that to capture screens.

Rick can help with that for sure.

Part of the problem, me thinks, is where the new install is actually inside the other older but used install.    Could be that the way GoDaddy does things there is an .htaccess file somewhere causing some issues.

Just my 2 cents! ;)

'spirit of sharing', Ken


In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Andreas Panagiotopoulos -

Is there any solution for the 'undefined' problem?

Does anyone knows something more?


In reply to Andreas Panagiotopoulos

Re: Many Problems with 3.2.2 Build 20170313

by Ken Task -
Picture of Particularly helpful Moodlers

Tours were introduced.  And on more than one site upgraded that box would popup at any time and any where.   I had been declining taking the tour.   Don't do that ... take the tour till it ends.   Once having done that myself, no strange pop up boxes appeared ... ever again. ;)

'sirit of sharing', Ken

Average of ratings: Useful (1)
In reply to Ken Task

Re: Many Problems with 3.2.2 Build 20170313

by AL Rachels -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers

Now that you mention it, I was getting the popups on my 3.3 site for QA testing. I did a test about tours....and now....no more popups.  thoughtful

In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Donna Lee -

Hi Guys,

Thank you all for your help and replies. So, there were a couple of issues going on. The first very big one was, like you said, the way I installed Moodle. I did a full uninstall and everything went back to normal for the existing instance of moodle.

I then created another account on my server with a dedicated IP and installed moodle. This time, these were the errors encountered:

1. Will not run cron

2. Will not run the scripts for database conversion to Barracuda

3. Undefined popups occasionally.

I wracked my brain, went over everything over and over again, tried to run cron from SSH. Tested my other two instance of moodle and they worked fine with running cron.

Finally, I gave a fellow "colleague", who is a programmer, full access to moodle and he found an error in the code for cli. Once he fixed this, all is running normally.

Thanks again for all of your help. I wanted to refrain from posting until I figured this out. 

In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Ken Task -
Picture of Particularly helpful Moodlers

It would be nice if this error in code ... fixed by programmer ... would be shared back here.

You might be helping someone else.

'spirit of sharing', Ken


In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

Along with what Ken said, I will add a few more thoughts.

1) Did you add a cron job for the second instance of Moodle.  Each moodle will need its own.

2) Did your programmer fix the script to fix the Barracuda problem, or 

3) did the programmer fix some script to fix the popup problem?

No need to answer my questions if everything is working well, but these questions might return in the future, and they are intended to help you learn more about installing moodle.

In reply to Rick Jerz

Re: Many Problems with 3.2.2 Build 20170313

by Donna Lee -

Hi Ken and Rick,

1) Yes, I added a cron job for new instance of moodle. I treated it completely separate and in its own directory, etc. I set the cron up in cPanel, exactly like I have it for the other two instances of moodle that work. When it failed to run, I then tried to run it from the command line manually through SSH. Still failed to run. 

2) For the Barracuda problem, I believe fixing the clilib.php file fixed me being able to run the script for the database file conversion. It's a CLI php script, so I believe this was the problem preventing this.

3) He only fixed the one problem in the clilib.php file. I don't know if this was causing the popup problem. I'm not sure how it would relate to this unless it is indeed related to the tours and the tours execute some kind of php? I don't know enough about this to say. I have not had a pop up since, but we'll see. I'll keep you posted.

Here was the error in syntax found:

In lib/clilib.php there was a syntax error

function cli_error($text, $errorcode=1) {

    cli_writeln($text.PHP_EOL, STDERR);

    die(." ".$text);

There was an extra "." before "

In reply to Donna Lee

Re: Many Problems with 3.2.2 Build 20170313

by Rick Jerz -
Picture of Particularly helpful Moodlers Picture of Testers

For #1, will need to see the cron job listing in cPanel, maybe a screen shot, so that we would know the exact form of the command.  When your run the other two cron jobs from SSH, do they work?

For #2, I am not a programmer so I can't comment on the fix.  But if you go into Site Admin, Server, Environment and get all OKs, you should be in good shape.

For #3, see MDL-58310 in Tracker.

In reply to Rick Jerz

Re: Many Problems with 3.2.2 Build 20170313

by Donna Lee -

Fixing the code finally ran the cron. It was the same exact cli I had in my other two installs. They were all running.