installing elgg 1.6 OK until 500 status code on /action/systemsettings/intsall

Hi,

I'm sorry if this is the wrong place and also if this is an obvious problem listed in the faq. I can create this problem consistently by deleting my app directory, data directory, database and database-user-account, and starting-from-scratch.

Problem:

* blank screen during install -- 500 status code on /elgg16/action/systemsettings/install

Context:

* I have unzipped the elgg1.6.zip file

* I've created a data directory /opt/elgg1.6_data

*I've chmod 777 for both the elgg app and data directory

* created database manually

* started up apache and launched elgg

* elgg connected to the database and ran some queries

* elgg prompted me for the community name, email address, etc.

* when I pressed submit, the system sent a blank page

The question:

* can you point me to a cause?

* how can I get elgg to give me  more information in its debug log

thanks,

 

bill

Appendix A. Log engties:

Access log:

10.100.10.25 - - [08/Sep/2009:12:03:27 -0500] "POST /elgg16/action/systemsettings/install HTTP/1.1" 500 -

Error log:

[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] 1 times: 'SELECT m.*, n.string as name, v.string as value from elggmetadata m JOIN elggentities e ON e.guid = m.entity_guid JOIN elggmetastrings v on m.value_id = v.id JOIN elggmetastrings n on m.name_id = n.id where m.entity_guid=1 and (  (e.access_id in (2) or (e.owner_guid = -1) or (e.access_id = 0 and e.owner_guid = -1)) and e.enabled='yes') and (  (m.access_id in (2) or (m.owner_guid = -1) or (m.access_id = 0 and m.owner_guid = -1)) and m.enabled='yes')' , referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] 1 times: 'SELECT a.*, n.string as name, v.string as value from elggannotations a JOIN elggentities e on a.entity_guid = e.guid JOIN elggmetastrings v on a.value_id=v.id JOIN elggmetastrings n on a.name_id = n.id where  a.entity_guid=1 and (  (a.access_id in (2) or (a.owner_guid = -1) or (a.access_id = 0 and a.owner_guid = -1)) and a.enabled='yes') order by a.time_created asc limit 0,10' , referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] 1 times: 'SELECT * from elggentity_relationships where guid_one=1' , referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] DB Queries for this page: 237, referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] ***************************************************, referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] Page /elgg16/action/systemsettings/install generated in 0.320895195007 seconds, referer: http://bmilspec2/elgg16/install.php
[Tue Sep 08 12:03:27 2009] [error] [client 10.100.10.25] Query cache invalidated, referer: http://bmilspec2/elgg16/install.php

  • Yes, this is an obvious problem listed in the faq

  • A follow-up. I had in-fact read the documentation and had already increased the 'memory_limit' to 64mb. Alas, I had   missed the point about setting 'display_errors on'. (The  'classic'--not the current--documentation mentions tweaking this setting. http://classic.elgg.org/mod/mediawiki/wiki/index.php/Common_installation_issues)

    quote:

    You can also tweak your .htaccess file: To find out what's causing the crash, add the line

       php_flag display_errors on

     

    Setting this value and re-installing from scratch (ie. dropping/recreating mysql account and db, deleting engine/settings.php), I see the cause, i.e this error appears on the screen:

    Fatal error: Call to undefined function hash_init() in /usr/local/elgg/elgg1.6/engine/lib/api.php on line 677

     

    The documentation suggests php > 5.1 includes the hash* ffunctions. I'm running PHP 5.2.1.0 along w/ Apache 2.2.11

     

    Any suggestions Or comments as to next steps?

     

    Again, please suggest a better spot for these questions. I had previously installed elgg 1.5 and didn't have these problems. I didn't think my environment changed...

     

    thanks,

     

    bill

  • hash_init() is an internal function in PHP...if it's not there it sounds like the hash cryptography extension wasn't enabled for your copy of PHP.

    Can you provide some details about your server?

  • hi,

    i found this also. I'm running gentoo witha recent kernel, but the php was compiled without the 'hash' keyword.

    I've rebuilt ('emerged ") and plan to try shortly (haven't had time yet).

    fwiw, my current use flags are as follows if any gentoo-folks know if gentoo needs any other use flags turned on to run elgg, please weigh in.

    thanks:

    reference: current use flags

    [ebuild   R   ] dev-lang/php-5.2.10  USE="apache2 berkdb bzip2 cgi cli crypt gd gdbm hash iconv imap ipv6 ldap mysql ncurses nls pcre readline reflection session simplexml spell spl ssl truetype unicode xml zlib -adabas -bcmath -birdstep -calendar -cdb -cjk -concurrentmodphp -ctype -curl -curlwrappers -db2 -dbase -dbmaker -debug -discard-path -doc -empress -empress-bcs -esoob -exif -fastbuild -fdftk -filter -firebird -flatfile -force-cgi-redirect -frontbase -ftp -gd-external -gmp -inifile -interbase -iodbc (-java-external) -json -kerberos -kolab -ldap-sasl -libedit -mcve -mhash -msql -mssql -mysqli -oci8 -oci8-instant-client -odbc -pcntl -pdo -pic -posix -postgres -qdbm -recode -sapdb -sharedext -sharedmem -snmp -soap -sockets -solid -sqlite -suhosin -sybase -sybase-ct -sysvipc -threads -tidy -tokenizer -wddx -xmlreader -xmlrpc -xmlwriter -xpm -xsl -yaz -zip" 0 kB

     

  • SOLVED

    a follow-up: rebuilding (emerging) php with the 'hash' option (use flag) solved the problem

    Thanks for the help.

    suggestion:

    • By default elgg shoud have 'display errors' on
    • An error page shoud include the message in a hidden div. A 'show/hide' javascript link would show the div, i.e. so that those-technically inclined can see the error by clicking 'show'
      
      
  • @Billmil -- Elgg in non-debug mode should definitely not have display errors on by default.  It is a standard security practice in web applications to disable specific error reporting on live servers.  However, in debug mode, error reporting should be enabled.  The same applies to hiding it in a div.  The reasoning behind this is that you don't want a misconfigured application announcing publicly what's happening on your server.