Moodle Hangs On admin/index.php 3.2.2-Details Below

Moodle Hangs On admin/index.php 3.2.2-Details Below

by Sumeen Kaur -
Number of replies: 12

Hi 

I am new to moodle. I am trying to install it locally on Mac OSX-EI Capitan. I have upgraded PHP to 5.6.30 and added required php.ini settings. I created a moodle folder, set up a loclahost pointint to it and moodledata folder for moodle content and gave permissions 0777 to them. I was also able to upgrade mysql configuration with full UTF support and required file format. So all plugins checks were marked OK at the time installation. 

On CLI, when i did php -m, i got the following list of modules installed-

apc

apcu

bcmath

bz2

calendar

Core

ctype

curl

date

dom

ereg

exif

fileinfo

filter

ftp

gd

gettext

gmp

hash

http

iconv

igbinary

imap

intl

json

ldap

libxml

mbstring

mcrypt

memcache

memcached

mhash

mongo

mssql

mysql

mysqli

mysqlnd

OAuth

openssl

pcntl

pcre

PDO

pdo_dblib

pdo_mysql

pdo_pgsql

pdo_sqlite

pgsql

Phar

posix

propro

raphf

readline

redis

Reflection

session

shmop

SimpleXML

soap

sockets

solr

SPL

sqlite3

ssh2

standard

sysvmsg

sysvsem

sysvshm

tidy

tokenizer

wddx

xdebug

xhprof

xml

xmlreader

xmlrpc

xmlwriter

xsl

Zend OPcache

zip

zlib


[Zend Modules]

Xdebug

Zend OPcache


I uploaded phpinfo for reference below to verify all required php settings are there. I think i have all updated.

I searched a lot in the Moodle Forum for this. I added debugging too in config.php but all I get as debug messages is that system is upgrading. No debugging in the apache error log. 

 The database tabled are created and some folders are created in moodledata folder too by the script. But the  URL - "http://moodle.localhost/admin/index.php?cache=0&agreelicense=1&confirmrelease=1&lang=en" keeps running with Installation System in the browser


What am I doing wrong here or what am I missing ?

I have spent hours on this and struggling to resolve this issue.  

I tried to go through the install.php to let the script create the config.php for me. I also tried the other way creating config.php as a copy of config-dist.php and add my settings there manually. I also renamed config-dist.php as I read it in one of the solutions in the forum.  

Any help or knowledge will be appreciated.  My apologies for the long explanation here but I just want to mention everything I tried.


Thanks

Sumeen




Average of ratings: -
In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Try deleting the cache and localcache folders from your moodleDATA folder.  I am presuming that you have accepted the license, etc and it is looping when you click on next?

In reply to Emma Richardson

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Sumeen Kaur -

Thanks Emma and Ken for a quick response. Looks like it worked. But the whole installation took around 2 hours. Not sure if it usually takes that much time. 

I spent 3-4 hours investigating what is going on and finally end up debugging the upgradelib.php file by adding some error_log statements my self. The script is kind of little misleading here. It was working but for the first 15 -20 minutes, did not output anything on the browser screen. After that, it started outputting some thing with success messages and ended with "continue" button. But the whole installation end up in 2 hrs. 

So I would suggest to have some output on the screen right when the installation starts so that the user know that it is working. 

However, I would definitely like to mention that your documentation for installation is very clear in how to set up.  

Thanks again for your quick response.







In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Ken Task -
Picture of Particularly helpful Moodlers

Emma is correct in suggestion ... but if that doesn't work ...

According to php info page shared ... php log is in

/var/log/apache2/php_errors.log

What, if anything, does it show there?

When you used the moodlecode/admin/cli/install.php script did you use any parameters with the command?

Among the optons:

--agree-license       Indicates agreement with software license,
                      required in non-interactive mode.

On Linux, one might normally add the non-interactive switch which by passes the agreeto license.

--non-interactive     No interactive questions, installation fails if any
                      problem encountered.

One would be prompted for some settings ... like full path to moodledata, admin user and admin password, but then, you also get to see if there are any other issues.

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Sumeen Kaur -

Thanks Emma and Ken for a quick response. Looks like it worked. But the whole installation took around 2 hours. Not sure if it usually takes that much time. 

I spent 3-4 hours investigating what is going on and finally end up debugging the upgradelib.php file by adding some error_log statements my self. The script is kind of little misleading here. It was working but for the first 15 -20 minutes, did not output anything on the browser screen. After that, it started outputting some thing with success messages and ended with "continue" button. But the whole installation end up in 2 hrs. 

So I would suggest to have some output on the screen right when the installation starts so that the user know that it is working. 

However, I would definitely like to mention that your documentation for installation is very clear in how to set up.  

Thanks again for your quick response.


In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

I guess it would depend on your server specs but the install normally takes a couple of minutes, not hours.  I would say that there is definitely something not quite right there.

In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Ken Task -
Picture of Particularly helpful Moodlers

Am in agreement with Emma ... something isn't right ... shouldn't have taken that long.   If it were me, I'd be hesitant to start using it ... ie, opening to teachers ... setting up courses and then enrolling students in those courses.   If you press forward, think I'd not do anything massive just yet.

Moodle is a resource hog ... period.  In the past, my efforts to fit a square peg in a round hole never seem to work out.

'sprit of sharing', Ken


In reply to Ken Task

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Sumeen Kaur -

Thanks again Emma and Ken

Well, it did not give me any errors while installing. I had some PHP settings missing initially in my ini file which I added with reference to your specs related to opcache etc. I also had my mysql  default not using Barrucucda file format which I set up. But this was all before installation starts. After setting the host, I used install.php to start installation. As of what I remember,  I did not accepted any license agreements or any other options. I just used the necessary ones for host, wwwroot, mysql setup, which I think is required for the config.php.

As the installation started, the database and cache files or other files were created quickly. 

The time it took most is while setting the modules which if passed sent "Success" message. I did not get any failure messages in the installation of these or while setting config.php. 

I dont exactly know where they are created may be some reference in database.  Inspecting your code and checking error logs, I see that it tried to install some modules under "/moodleroot/mod"   directory. For example- modules like mod_wiki, mod_glossary etc. There were a lot of them . Look like the core modules. Some of them defined in under /moodleroot/mod/glossary/classes/search/activity.php as an example

May be you can highlight some knowledge on these ?


Thanks

Sumeen

 


In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Ken Task -
Picture of Particularly helpful Moodlers

Wow!   Really?  Not meaning to be argumentative ... only helpful, but the question you've asked is research and a question you can answer to your own satisfaction.  

Download a zip of moodle.  Don't try to install.   Just look at what's in mod or block.   Those are 'core' ... comes with the package.   If you look at what they are ... wiki for example ... how old are wiki's?  Remember, Moodle is comprised of 'glue code' ... and the major mods in Moodle are not the 'granddaddies' of those apps but more like a 'walled garden' of those apps.   Wiki - maybe the premier/best is media Wiki.   Blogs - maybe the premier/best is Word Press.  Pages - maybe the premier/best is Joomla/Drupal (content management system) etc, etc., etc.  There's a new term now afloat ... 'more modern' ... I don't claim to know exactly what that means, but could one consider glue code Wiki or Blog or Page to be 'more modern'?

Also consider that even though Moodle professes that it can run on anything ... that maybe, just maybe ... there are some operating systems better suited.   Somewhere in the sea of docs for Moodle you can still find a small sentence that suggest and recommend Linux ... but they don't see which flavor of.   MacIntosh, historically, has never been into the 'server' end of things.  Mac's are closer to Linux but they are not Linux servers.

Maybe you have hardware that's simply under powered - regardless of OS.

The only way you can, to your own satisfaction, is to spin up a Windows machine with Moodle and spin up a Linux machine with Moodle.   When it comes to Linux, it's been my experience that less graphical is best ... ie, no GUI deskop.   Can't tell you the number of times have been asked to investigate a Moodle install, found a GUI Desktop running that had all sorts of little applets running ... screen saver, a game left running not properly closed,  as well as little applets that showed drive usage and processing ... running ... doing nothing more than  taking away from processing/CPU cycles etc. server needed for Moodle to function more efficiently.  Was considered by those who asked for assitatnce to be a 'genie/guru' when I shut those down ... prevent launching of ... and wag a finger at Server Admin reminding them of the purpose of the server to begin with .... not a toy/play thing.   Duh!

Above ... 2 cent opinion but based upon years of experience ... in Ed Tech., servers, LAN's/WAN's etc..

See profile if you like. ;)

'spirit of sharing', Ken


In reply to Ken Task

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Sumeen Kaur -

Thanks Ken

I was not trying to comment at all on Moodle technology aspects here. I am pretty sure and know, that installation on actual servers could be faster. Moreover, seeing your downloads you already have a complete installation for moodle to work on an empty box. I am complete newbie here with Moodle. I am not a server person here but an application developer who just want to integrate Moodle with a client website and as a starting step, setting up moodle on local environment.


Anyway, thanks a lot for your help. One last question I would like to ask in order to cut short my research time here -  Do you have a rest api for moodle that I can use to integrate with another website ? For example, i want to get all courses that I add in moodle as an api call and show on another custom website. 


Thanks

Sumeen

In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

What is your website running?  Wordpress and Joomla both have plugins that do Moodle integration...

In reply to Sumeen Kaur

Re: Moodle Hangs On admin/index.php 3.2.2-Details Below

by Ken Task -
Picture of Particularly helpful Moodlers

Once again, Emma is correct - there do exist such things for Joomla and for Wordpress.  Do I have an API ... sorry, nope.  Since you are developing what sounds like customized at both ends, might I suggest setting something up on under-powered may not be very impressive to 'clients'.  In many years of witnessing 'dog and pony' shows and hearing ... 'Oh, we can fix that later ...' ... well, don't need to say more there do I? 

Can't speak for any/all developers, obviously, but have observed some changes over the last decade.  The 'dirty little secret' back then was most developers used Windows to develop Moodle on Linux - apps used for developing exist only for that platform.   But things changed when Mac came out with OSX (first noticed at ApacheCon) and later the apps used for developing finally arrived on that platform.   Same thing is happening with Ubuntu workstations today.   So tomorrow?   100% server based and it will make no difference what you have for a work station.

Granted at this stage you don't want to invest nor commit your finances just yet ... but regardless of what you are developing, it will end up on server.   So what do your clients run?   That's not a real question but one for thought.

2 cent advice again! :\

'spirit of sharing', Ken