fisharebest / webtrees

Online genealogy
https://webtrees.net
GNU General Public License v3.0
457 stars 298 forks source link

Fatal error: During inheritance of ArrayAccess #4473

Closed SvbZ3r0 closed 2 years ago

SvbZ3r0 commented 2 years ago

I am new to Webtrees. I am running a (unofficial?) docker container. Admittedly, I do not know if the problem is from the container or from the application or from some mistake I've made. However, I simply cannot get the application to work.

The webpage just says Fatal Error followed by an error message I can't make sense of. Here it is in full:

Fatal error: 
During inheritance of ArrayAccess: 
Uncaught ErrorException: 
Return type of Illuminate\Container\Container::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in /var/www/webtrees/vendor/illuminate/container/Container.php:1214 
Stack trace: 
#0 /var/www/webtrees/vendor/illuminate/container/Container.php(15): Fisharebest\Webtrees\Webtrees::Fisharebest\Webtrees\{closure}(8192, 'Return type of ...', '/var/www/webtre...', 1214) 
#1 /var/www/webtrees/vendor/composer/ClassLoader.php(571): include('/var/www/webtre...') 
#2 /var/www/webtrees/vendor/composer/ClassLoader.php(428): Composer\Autoload\includeFile('/var/www/webtre...') 
#3 /var/www/webtrees/app/Webtrees.php(300): Composer\Autoload\ClassLoader->loadClass('Illuminate\\Cont...') 
#4 /var/www/webtrees/app/Webtrees.php(220): Fisharebest\Webtrees\Webtrees::set('Psr\\Http\\Messag...', 'Nyholm\\Psr7\\Fac...') 
#5 /var/www/webtrees/index.php(44): Fisharebest\Webtrees\Webtrees->httpRequest() 
#6 {main} in /var/www/webtrees/vendor/illuminate/container/Container.php on line 15

image

My docker command, if it is needed:

docker run -d --name='Webtrees' --net='bridge' 
-p '8088:80/tcp' 
-v '/mnt/user/appdata/webtrees/data':'/var/www/webtrees/data':'rw' 
-v '/mnt/user/appdata/webtrees/media':'/var/www/webtrees/media':'rw' 
-e TZ="Asia/Calcutta" 
-e HOST_OS="Unraid" 
-e 'LANG'='en-in' 
-e 'DB_TYPE'='pgsql' 
-e 'DB_HOST'='localhost' 
-e 'DB_PORT'='5432' 
-e 'DB_USER'='webtrees' 
-e 'DB_PASS'='webtrees' 
-e 'DB_NAME'='webtrees' 
-e 'DB_PREFIX'='wt_' 
-e 'WT_USER'='user' 
-e 'WT_NAME'='User Name' 
-e 'WT_PASS'='password' 
-e 'WT_EMAIL'='user_name@email.com' 
-e 'BASE_URL'='https://sub.domain.com/family/' 
-e 'PRETTY_URLS'='true' 
'nathanvaughn/webtrees'
fisharebest commented 2 years ago

Looks like a PHP / webtrees version mis-match.

Please confirm which versions you are using.

NathanVaughn commented 2 years ago

Creator of the container here, can replicate this as well, will look into it. Does not seem to affect version 2.1.4 of the container.

NathanVaughn commented 2 years ago

It's a Docker tagging issue, the latest tag mistakenly got stuck on Webtrees 2.0.24, and the container is built with PHP 8.1, so ti doesn't work.

fisharebest commented 2 years ago

@NathanVaughn - there is a docker installation mentioned at https://webtrees.net/install/

Is this you? If not, and you'd like to be included on this page, just create a PR.