PHP Fatal error: Uncaught Error: Call to undefined function Zotlabs\Photo\imagetypes()
After a new installing of the server, I cannot see the photos anymore. I get a http 500 error. The log shows an php error.
I believe, I get this error now after a new installation of the server:
hubzilla.app | 172.19.0.3 - 31/Mar/2021:12:35:26 +0200 "GET /index.php" 500
hubzilla.app | NOTICE: PHP message: PHP Fatal error: Uncaught Error: Call to undefined function Zotlabs\Photo\imagetypes() in /code/Zotlabs/Photo/PhotoGd.php:20
hubzilla.app | Stack trace:
hubzilla.app | #0 /code/Zotlabs/Photo/PhotoDriver.php(116): Zotlabs\Photo\PhotoGd->supportedTypes()
hubzilla.app | #1 /code/include/photo/photo_driver.php(55): Zotlabs\Photo\PhotoDriver->__construct('', NULL)
hubzilla.app | #2 /code/Zotlabs/Module/Photos.php(534): photo_factory('')
hubzilla.app | #3 /code/Zotlabs/Web/Router.php(288): Zotlabs\Module\Photos->get()
hubzilla.app | #4 /code/Zotlabs/Web/WebServer.php(108): Zotlabs\Web\Router->Dispatch()
hubzilla.app | #5 /code/index.php(14): Zotlabs\Web\WebServer->run()
hubzilla.app | #6 {main}
hubzilla.app | thrown in /code/Zotlabs/Photo/PhotoGd.php on line 20
hubzilla.web | 172.19.0.1 - - [31/Mar/2021:12:35:26 +0200] "GET /photos/heiko HTTP/1.0" 500 0 "-" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:87.0) Gecko/20100101 Firefox/87.0"
hubzilla.web | 2021/03/31 12:35:26 [error] 22#22: *3 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to undefined function Zotlabs\Photo\imagetypes() in /code/Zotlabs/Photo/PhotoGd.php:20
hubzilla.web | Stack trace:
hubzilla.web | #0 /code/Zotlabs/Photo/PhotoDriver.php(116): Zotlabs\Photo\PhotoGd->supportedTypes()
hubzilla.web | #1 /code/include/photo/photo_driver.php(55): Zotlabs\Photo\PhotoDriver->__construct('', NULL)
hubzilla.web | #2 /code/Zotlabs/Module/Photos.php(534): photo_factory('')
hubzilla.web | #3 /code/Zotlabs/Web/Router.php(288): Zotlabs\Module\Photos->get()
hubzilla.web | #4 /code/Zotlabs/Web/WebServer.php(108): Zotlabs\Web\Router->Dispatch()
hubzilla.web | #5 /code/index.php(14): Zotlabs\Web\WebServer->run()
hubzilla.web | #6 {main}
hubzilla.web | thrown in /code/Zotlabs/Photo/PhotoGd.php on line 20" while reading response header from upstream
I checked, if the gd and imagemagick exist:
# find . -name Photo*
./tests/unit/Photo
./tests/unit/Photo/PhotoGdTest.php
./tests/unit/includes/PhotodriverTest.php
./Zotlabs/Photo
./Zotlabs/Photo/PhotoDriver.php
./Zotlabs/Photo/PhotoGd.php
./Zotlabs/Photo/PhotoImagick.php
./Zotlabs/Widget/Photo_rand.php
./Zotlabs/Widget/Photo.php
./Zotlabs/Widget/Photo_albums.php
./Zotlabs/Module/Settings/Photos.php
./Zotlabs/Module/Photo.php
./Zotlabs/Module/Photos.php
My expirience with php is not enough to fix this error myself.
I believe, if I can run the system check from the install of hubzilla again, I could see, if a library is missing.
Any ideas?
Thank you in advance.