WSOD in cdm_dataportal/search/results/taxon
#1 Updated by Andreas Kohlbecker about 1 year ago
- Status changed from New to In Progress
- % Done changed from 0 to 10
This problem is caused by the image with the URI http://184.108.40.206/files/Others/small/DSCN0964.jpg. This jpeg file is corrupt and can not loaded as image via
imagecreatefromstring() which is using gdlib internally.
Unfortunately there seems to be a bug which casues to
imagecreatefromstring() raises a FATAL ERROR in some cases (see https://bugs.php.net/bug.php?id=73479 https://bugs.php.net/bug.php?id=73986 and finally https://github.com/libgd/libgd/issues/338) which subsequently causes the php script to stop, thus the WSOD.
The call to
imagecreatefromstring() was prefixed with the error control operator
@ which suppresses the error reporting, so there was no hint on the error in the logs etc. Usually
imagecreatefromstring() reports a error of 'warning' level.
- remove error control operator and try to "catch" any warning to avoid ugly error boxes being presented to the user in this case.
- find a php or gdlib version which is not raising fatal errors.
#2 Updated by Andreas Kohlbecker about 1 year ago
- Status changed from In Progress to Resolved
- Assignee changed from Andreas Kohlbecker to Andreas Müller
- % Done changed from 10 to 50
This issue is supposed to be solved by libgd 2.2.5
On debian 8 (edit-production and edit-test) the version of libgd is 2.1.0-5+deb8u11
on debian 9 it is also only 2.2.4-2+deb9u2.
This means to wait until debian 9 provides at least 2.2.5 and to upgrade to debian 9 then.
Until this is possible we only can fix the image so that at at least the result page in flora of greece it working again in all cases.
So there is noting left to fix in the dataportal code. but we should consider upgrading the server in the next months.
@Andreas Müller can you please ask the people in greece to fix or remove this image?
#5 Updated by Andreas Müller about 1 year ago
- Status changed from Resolved to Feedback
- Assignee changed from Andreas Müller to Andreas Kohlbecker
Hi asked Greece admins to fix the image.
Do I understand it correctly that it is not possible with the current library to better catch the error/warning than by showing a WSOD (before we install the fixed version of libgd)? Or is this only an additional fix to do.
How far is this ticket already fixed then?
#6 Updated by Andreas Kohlbecker about 1 year ago
- Status changed from Feedback to Closed
- % Done changed from 50 to 100
Yes, exactly, there is no way of catching and handling this error so that the page is being displayed at least in a limited way. This is because this error coming from libdg is a FATAL ERROR which causes the php process to being stopped immediately. You only can register a custom error handler be which you can change the way the error is reported but you can not prevent the process from being terminated.
So this issue is handled completely and can be closed.
I will open another issue to remind us to upgrade to debian 10 once it is relased: #8057