Fatal error PHP error between installation step 4 and 5.

Hello together,

I'm new here, so thanks for the opportunity and I hope to get some help. I searched a lot but didn't find any conclusion. I'm experiencing a php fatal error when trying to bringing up the elgg software.

First of all:

I run a docker container with debian stretch, apache and php 7.2 from the official php-docker-repo (repo.https://github.com/docker-library/php) as well as a second container with a MySQL-DB and try to run the latest elgg-version 2.3.4

I installed all necessary php-plugins, provided the apache config(url-rewriting aso), setup the mysql-connection, checked permissions and got this the 4th installation step, where I need to configure my site and create the settings.php.(http://127.0.0.1:8080/install.php?step=settings) Going next I receive this:

Fatal error: Declaration of ElggSite::delete() must be compatible with ElggEntity::delete($recursive = true) in /var/www/html/elgg/vendor/elgg/elgg/engine/classes/ElggSite.php on line 28

I don't have any idea how to fix that. I tried different PHP- or Elgg-versions, figuring out missing php-extensions, fixing permissions. I can't get further.

Here is a list of my php modules:

[PHP Modules]
Core
ctype
curl
date
dom
fileinfo
filter
ftp
gd
hash
iconv
intl
json
libxml
mbstring
mysqlnd
openssl
pcre
PDO
pdo_mysql
pdo_sqlite
pgsql
Phar
posix
readline
Reflection
session
SimpleXML
soap
SPL
sqlite3
standard
tokenizer
xml
xmlreader
xmlrpc
xmlwriter
zip
zlib
  • Could you try with PHP 7.1 instead of PHP 7.2? Final version of 7.2 is not yet out, and it might be that it's a bug in PHP causing this fatal error instead of just a warning as it seems to have been before. Or it might be that Elgg is just not yet ready for PHP 7.2 if there had been some backward incompatible changes made in PHP 7.2 with regards to incompatible method declarations.

  • Php 7.2 is not for production use. 7.1.11 is last stable version. I am using 7.1.8 and Elgg2.3.4

  • I'm seeing the same error on my development sites now, just from loading the homepage - I am using php 7.1.17.

  • @ura

    Error or warning? Sure it's not php 7.2? I believe on php 7.1 there's just a warning. On php 7.2 it's an error.

    Which version of Elgg? Latest 2.3 version should have fixed it.

    Is the error due to Elgg core or due to a 3rd party plugin? For example, Tidypics and izapVideos also cause an error on php 7.2 with the versions currently available here on the community site. I have fixed it for these plugins already in the corresponding github repositories but not yet made a new release (at least for Tidypics a new release should come soon).

  • It is a fatal error with PHP 7.1.17.

    I haven't updated the elgg version for quite a while, so I don't think I have the latest version of elgg 2.3, but I can't login to the UI to check which version I am running. I will try to update it shortly.

    I just renamed the mod folder to see if that stopped the error, but it didn't.

  • vendor/elgg/elgg/CHANGELOG.md would tell you which version is installed.

  • Thanks - I updated Elgg and Tidypics on my local server and all went well, the fatal errors stopped.
    However, now I have a new issue..
    On my live server, I updated Elgg and Tidypics in the same way, but when a page is loaded which contains a tidypics image, the page has a new fatal error:

    undefined method ElggObject::getTitle()

    I have no idea why this is occurring as the permission/owners for tidypics are the same on both servers AFAIK

  • Ah it's working now. There was an error during the initial activation of Tidypics - so I deactivated and reactivated to clear it.

  • @ura Was the initial error on Tidypics activation something that would need to be fixed or was it just some server glich? Btw. how do you like the new slideshow of Tidypics?

  • I don't know what the cause of the error was on activation - it may possibly have been a permissions issue that I fixed after initially activating.

    Ah, thanks for the tip about the slideshow - I already use the one from Tidypics Plus, so I wasn't seeing the new one. I like the smooth animation of your new one, I'm not sure if I will have time to do much to integrate it into tidypics plus though as I am so busy with blockchain tasks at the moment.