Elgg installation on LAMP server.

I followed this tutorial online to install Elgg. However at the last stage, when I copied the folder to my html directory and tried to access the installation page, I got the following exception:

exception:title

An unrecoverable error has occurred and has been logged. If you are the site administrator check your settings file, otherwise contact the site administrator with the following information:

Exception at time 1500802810.

Can someone be so kind to help me out.

  • [Sun Jul 23 17:51:17.639024 2017] [:error] [pid 1172] [client 192.168.1.4:57375] Exception at time 1500814277: Error: Class 'DOMDocument' not found in /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggAutoP.php:89\nStack trace:\n#0 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/output.php(47): ElggAutoP->process('Installing Elgg...')\n#1 /var/www/html/sirocco/vendor/elgg/elgg/views/installation/install/pages/welcome.php(6): elgg_autop('Installing Elgg...')\n#2 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(370): include('/var/www/html/a...')\n#3 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(306): Elgg\\ViewsService->renderViewFile('install/pages/w...', Array, 'installation', true)\n#4 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/views.php(337): Elgg\\ViewsService->renderView('install/pages/w...', Array, false, 'installation')\n#5 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(250): elgg_view('install/pages/w...', Array)\n#6 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(276): ElggInstaller->render('welcome')\n#7 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(132): ElggInstaller->welcome(Array)\n#8 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/Application.php(485): ElggInstaller->run('welcome')\n#9 /var/www/html/sirocco/install.php(11): Elgg\\Application::install()\n#10 {main}
  • What's the PHP version used on your LAMP stack? For recent versions of Elgg you would need PHP version 5.6 at minimum (though I'm not 100% sure the error you see is caused by a too old PHP version).

  • @iionly, mine is php7. If there is any more information I can give, please feel free to ask. I really need this system.

  • When I create a php info file on my website folder, it finally worked after some configuration. If there's anything further to test my php, please let me know.

    php -version

    PHP 7.0.18-0ubuntu0.16.04.1 (cli) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.0.0, Copyright (c) 1998-2017 Zend Technologies
        with Zend OPcache v7.0.18-0ubuntu0.16.04.1, Copyright (c) 1999-2017, by Zend Technologies

    mysql -V

    mysql  Ver 14.14 Distrib 5.7.19, for Linux (x86_64) using  EditLine wrapper

    apache2 version

    Server version: Apache/2.4.18 (Ubuntu)
    Server built:   2017-06-26T11:58:04

    One more thing, as per the instruction I followed (link given above) I downloaded the package from this site, unzipped the folder to a new folder and then, using the command line, moved that folder to my web area. The only difference was that on xampp they moved their mysocialnetwork folder to htdocs and deducing from their address (localhost/mysocialnetwork), I thought I should move it to the /var/www/html folder.

  • @RvR,

    Thank you for your reply. 

    I had a peek at the page you gave. I also changed my php.ini file to save error logs as per that guy.

    But now the exception number has changed:

    exception:title

    An unrecoverable error has occurred and has been logged. If you are the site administrator check your settings file, otherwise contact the site administrator with the following information:

    Exception at time 1500897790.

    Sorry to be such a pain in the ass, but is there any reference to what those numbers mean? If yes, please give the direction to them, because I don't wanna be a badass just posting those numbers and getting you the job done for me.

  • is there any reference to what those numbers mean?

    Don't worry about this: it's a timestamp that tells when the error occurred. But you must check your server's error log to see the actual error message.

  • I have the following in the error log:

     

    [Mon Jul 24 17:03:10.504421 2017] [:error] [pid 2981] [client 192.168.1.2:56283] Exception at time 1500897790: Error: Class 'DOMDocument' not found in /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggAutoP.php:89\nStack trace:\n#0 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/output.php(47): ElggAutoP->process('Installing Elgg...')\n#1 /var/www/html/sirocco/vendor/elgg/elgg/views/installation/install/pages/welcome.php(6): elgg_autop('Installing Elgg...')\n#2 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(370): include('/var/www/html/a...')\n#3 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(306): Elgg\\ViewsService->renderViewFile('install/pages/w...', Array, 'installation', true)\n#4 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/views.php(337): Elgg\\ViewsService->renderView('install/pages/w...', Array, false, 'installation')\n#5 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(250): elgg_view('install/pages/w...', Array)\n#6 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(276): ElggInstaller->render('welcome')\n#7 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(132): ElggInstaller->welcome(Array)\n#8 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/Application.php(485): ElggInstaller->run('welcome')\n#9 /var/www/html/sirocco/install.php(11): Elgg\\Application::install()\n#10 {main}
    [Mon Jul 24 17:09:58.081695 2017] [:error] [pid 2990] [client 192.168.1.2:56336] Exception at time 1500898198: Error: Class 'DOMDocument' not found in /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggAutoP.php:89\nStack trace:\n#0 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/output.php(47): ElggAutoP->process('Installing Elgg...')\n#1 /var/www/html/sirocco/vendor/elgg/elgg/views/installation/install/pages/welcome.php(6): elgg_autop('Installing Elgg...')\n#2 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(370): include('/var/www/html/a...')\n#3 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(306): Elgg\\ViewsService->renderViewFile('install/pages/w...', Array, 'installation', true)\n#4 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/views.php(337): Elgg\\ViewsService->renderView('install/pages/w...', Array, false, 'installation')\n#5 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(250): elgg_view('install/pages/w...', Array)\n#6 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(276): ElggInstaller->render('welcome')\n#7 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(132): ElggInstaller->welcome(Array)\n#8 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/Application.php(485): ElggInstaller->run('welcome')\n#9 /var/www/html/sirocco/install.php(11): Elgg\\Application::install()\n#10 {main}
    [Mon Jul 24 17:13:17.017766 2017] [:error] [pid 2983] [client 192.168.1.7:44158] Exception at time 1500898397: Error: Class 'DOMDocument' not found in /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggAutoP.php:89\nStack trace:\n#0 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/output.php(47): ElggAutoP->process('Installing Elgg...')\n#1 /var/www/html/sirocco/vendor/elgg/elgg/views/installation/install/pages/welcome.php(6): elgg_autop('Installing Elgg...')\n#2 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(370): include('/var/www/html/a...')\n#3 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(306): Elgg\\ViewsService->renderViewFile('install/pages/w...', Array, 'installation', true)\n#4 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/views.php(337): Elgg\\ViewsService->renderView('install/pages/w...', Array, false, 'installation')\n#5 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(250): elgg_view('install/pages/w...', Array)\n#6 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(276): ElggInstaller->render('welcome')\n#7 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(132): ElggInstaller->welcome(Array)\n#8 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/Application.php(485): ElggInstaller->run('welcome')\n#9 /var/www/html/sirocco/install.php(11): Elgg\\Application::install()\n#10 {main}
    [Mon Jul 24 17:52:09.463249 2017] [:error] [pid 2990] [client 192.168.1.2:56413] Exception at time 1500900729: Error: Class 'DOMDocument' not found in /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggAutoP.php:89\nStack trace:\n#0 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/output.php(47): ElggAutoP->process('Installing Elgg...')\n#1 /var/www/html/sirocco/vendor/elgg/elgg/views/installation/install/pages/welcome.php(6): elgg_autop('Installing Elgg...')\n#2 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(370): include('/var/www/html/a...')\n#3 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/ViewsService.php(306): Elgg\\ViewsService->renderViewFile('install/pages/w...', Array, 'installation', true)\n#4 /var/www/html/sirocco/vendor/elgg/elgg/engine/lib/views.php(337): Elgg\\ViewsService->renderView('install/pages/w...', Array, false, 'installation')\n#5 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(250): elgg_view('install/pages/w...', Array)\n#6 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(276): ElggInstaller->render('welcome')\n#7 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/ElggInstaller.php(132): ElggInstaller->welcome(Array)\n#8 /var/www/html/sirocco/vendor/elgg/elgg/engine/classes/Elgg/Application.php(485): ElggInstaller->run('welcome')\n#9 /var/www/html/sirocco/install.php(11): Elgg\\Application::install()\n#10 {main}
  • Error seems still the same.

    As (not really obviously) mentioned in https://elgg.org/discussion/view/2621973/trouble-on-ubuntu-1604-with-php-70 it might be that you have the php-xml extension not installed. Possibly the same error is mentioned at https://stackoverflow.com/questions/14395239/class-domdocument-not-found (though not connected with Elgg there). As it says there, the php-xml package might be called php5-dom on some systems (e.g. Debian so maybe also on Ubuntu).

    Check if php-xml (or php5-dom) is installed on your server and add it if it isn't. You might also want to check if php-gd is installed as Elgg also requires this package.