Ask a Question related to PHP Bugs, Design and Development.
-
pz at mysqlperformanceblog dot com #1
#39780 [NEW]: Fatal error reported for recoverable error
From: pz at mysqlperformanceblog dot com
Operating system: Linux
PHP version: 5.2.0
PHP Bug Type: GD related
Bug description: Fatal error reported for recoverable error
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
--
Edit bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
--
Try a CVS snapshot (PHP 4.4): [url]http://bugs.php.net/fix.php?id=39780&r=trysnapshot44[/url]
Try a CVS snapshot (PHP 5.2): [url]http://bugs.php.net/fix.php?id=39780&r=trysnapshot52[/url]
Try a CVS snapshot (PHP 6.0): [url]http://bugs.php.net/fix.php?id=39780&r=trysnapshot60[/url]
Fixed in CVS: [url]http://bugs.php.net/fix.php?id=39780&r=fixedcvs[/url]
Fixed in release: [url]http://bugs.php.net/fix.php?id=39780&r=alreadyfixed[/url]
Need backtrace: [url]http://bugs.php.net/fix.php?id=39780&r=needtrace[/url]
Need Reproduce Script: [url]http://bugs.php.net/fix.php?id=39780&r=needscript[/url]
Try newer version: [url]http://bugs.php.net/fix.php?id=39780&r=oldversion[/url]
Not developer issue: [url]http://bugs.php.net/fix.php?id=39780&r=support[/url]
Expected behavior: [url]http://bugs.php.net/fix.php?id=39780&r=notwrong[/url]
Not enough info: [url]http://bugs.php.net/fix.php?id=39780&r=notenoughinfo[/url]
Submitted twice: [url]http://bugs.php.net/fix.php?id=39780&r=submittedtwice[/url]
register_globals: [url]http://bugs.php.net/fix.php?id=39780&r=globals[/url]
PHP 3 support discontinued: [url]http://bugs.php.net/fix.php?id=39780&r=php3[/url]
Daylight Savings: [url]http://bugs.php.net/fix.php?id=39780&r=dst[/url]
IIS Stability: [url]http://bugs.php.net/fix.php?id=39780&r=isapi[/url]
Install GNU Sed: [url]http://bugs.php.net/fix.php?id=39780&r=gnused[/url]
Floating point limitations: [url]http://bugs.php.net/fix.php?id=39780&r=float[/url]
No Zend Extensions: [url]http://bugs.php.net/fix.php?id=39780&r=nozend[/url]
MySQL Configuration Error: [url]http://bugs.php.net/fix.php?id=39780&r=mysqlcfg[/url]
pz at mysqlperformanceblog dot com Guest
-
#40587 [NEW]: Attempt to call undefined function gives a fatal error instead of recoverable
From: mathiasrav at gmail dot com Operating system: WinXP PHP version: 5.2.1 PHP Bug Type: Feature/Change Request Bug... -
Fireworks reported an I O error.
Having trouble with Web Photo Album 2.2.6 for Dreamweaver MX2004. It was working up until a few weeks ago. Now I get this error when trying to... -
Error reported to webmaster, but page loads fine
I have an error handeler in the coldfusion administrator that will let me know when an error is generated on any page on the server. If an error is... -
#9719 [Com]: Dash in URL causing CGI Error to be reported
ID: 9719 Comment by: porantim at hotmail dot com Reported By: bradmiller at accesszone dot com Status: Closed... -
BUG: Incorrect error numbers being reported with TCPSocket
Hello I'm using ruby 1.8.0 on windows 2000. I've discovered that when TCPSocket.new raises an exception, the Exception.errno variable contains... -
tony2001@php.net #2
#39780 [Opn->Asn]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]tony2001@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
-Status: Open
+Status: Assigned
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
-Assigned To:
+Assigned To: pajoye
New Comment:
Pierre, is E_ERROR really required in this case?
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 18:25:56] pz at mysqlperformanceblog dot com
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
tony2001@php.net Guest
-
iliaa@php.net #3
#39780 [Asn->Fbk]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]iliaa@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
-Status: Assigned
+Status: Feedback
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 18:33:46] [email]tony2001@php.net[/email]
Pierre, is E_ERROR really required in this case?
------------------------------------------------------------------------
[2006-12-08 18:25:56] pz at mysqlperformanceblog dot com
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
iliaa@php.net Guest
-
pajoye@php.net #4
#39780 [Fbk]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
Status: Feedback
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
Please provide a working link to the image.
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 20:02:21] [email]iliaa@php.net[/email]
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
------------------------------------------------------------------------
[2006-12-08 18:33:46] [email]tony2001@php.net[/email]
Pierre, is E_ERROR really required in this case?
------------------------------------------------------------------------
[2006-12-08 18:25:56] pz at mysqlperformanceblog dot com
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest
-
pz at mysqlperformanceblog dot com #5
#39780 [Fbk->Opn]: Fatal error reported for recoverable error
ID: 39780
User updated by: pz at mysqlperformanceblog dot com
Reported By: pz at mysqlperformanceblog dot com
-Status: Feedback
+Status: Open
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 20:02:35] [email]pajoye@php.net[/email]
Please provide a working link to the image.
------------------------------------------------------------------------
[2006-12-08 20:02:21] [email]iliaa@php.net[/email]
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
------------------------------------------------------------------------
[2006-12-08 18:33:46] [email]tony2001@php.net[/email]
Pierre, is E_ERROR really required in this case?
------------------------------------------------------------------------
[2006-12-08 18:25:56] pz at mysqlperformanceblog dot com
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pz at mysqlperformanceblog dot com Guest
-
pajoye@php.net #6
#39780 [Opn->Ana]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
-Status: Open
+Status: Analyzed
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 20:17:42] pz at mysqlperformanceblog dot com
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
------------------------------------------------------------------------
[2006-12-08 20:02:35] [email]pajoye@php.net[/email]
Please provide a working link to the image.
------------------------------------------------------------------------
[2006-12-08 20:02:21] [email]iliaa@php.net[/email]
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
------------------------------------------------------------------------
[2006-12-08 18:33:46] [email]tony2001@php.net[/email]
Pierre, is E_ERROR really required in this case?
------------------------------------------------------------------------
[2006-12-08 18:25:56] pz at mysqlperformanceblog dot com
Description:
------------
Getting the following error:
PHP Fatal error: imagecreatefromstring(): gd-png: fatal libpng error:
IDAT: CRC error in
Note this is FATAL error for what should have been simply false result
code from the function.
Reproduce code:
---------------
imagecreatefromstring(file_get_contents("http://www.bennygold.com/uploaded_images/crack_line1-793571.gif"));
Expected result:
----------------
FALSE returned from the function with warning printed
Actual result:
--------------
Script is terminated with fatal error
------------------------------------------------------------------------
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest
-
pz at mysqlperformanceblog dot com #7
#39780 [Ana]: Fatal error reported for recoverable error
ID: 39780
User updated by: pz at mysqlperformanceblog dot com
Reported By: pz at mysqlperformanceblog dot com
Status: Analyzed
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
Sure image is invalid. This is not the point.
The function is specified as it ether returns image or FALSE on error.
If it also can in case of error terminate script execution or format
the hard drive it is better to be specified in docs :)
Now regarding what I provide - the name of the file does not matter in
this case as image is created from memory buffer. I just gave you the
real image on which my thumbnail generation script failed.
Out of few millions of images processed many were malformed etc but in
most cases PHP handles it correctly by reporting FALSE and printing
appropriate warning. So at least this behavior is inconsistent.
Previous Comments:
------------------------------------------------------------------------
[2006-12-08 21:47:30] [email]pajoye@php.net[/email]
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
------------------------------------------------------------------------
[2006-12-08 20:17:42] pz at mysqlperformanceblog dot com
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
------------------------------------------------------------------------
[2006-12-08 20:02:35] [email]pajoye@php.net[/email]
Please provide a working link to the image.
------------------------------------------------------------------------
[2006-12-08 20:02:21] [email]iliaa@php.net[/email]
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
------------------------------------------------------------------------
[2006-12-08 18:33:46] [email]tony2001@php.net[/email]
Pierre, is E_ERROR really required in this case?
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39780[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pz at mysqlperformanceblog dot com Guest
-
pajoye@php.net #8
#39780 [Ana]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
Status: Analyzed
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
"Sure image is invalid. This is not the point. "
My point is to have the relelevant informations in the report instead
of letting us wondering what you are trying to do or achieve. And it is
a valid requirement.
"The function is specified as it ether returns image or FALSE on
error."
As I just said, I have to test further to see if it is safe to continue
the script execution.
Previous Comments:
------------------------------------------------------------------------
[2006-12-09 09:59:47] pz at mysqlperformanceblog dot com
Sure image is invalid. This is not the point.
The function is specified as it ether returns image or FALSE on error.
If it also can in case of error terminate script execution or format
the hard drive it is better to be specified in docs :)
Now regarding what I provide - the name of the file does not matter in
this case as image is created from memory buffer. I just gave you the
real image on which my thumbnail generation script failed.
Out of few millions of images processed many were malformed etc but in
most cases PHP handles it correctly by reporting FALSE and printing
appropriate warning. So at least this behavior is inconsistent.
------------------------------------------------------------------------
[2006-12-08 21:47:30] [email]pajoye@php.net[/email]
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
------------------------------------------------------------------------
[2006-12-08 20:17:42] pz at mysqlperformanceblog dot com
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
------------------------------------------------------------------------
[2006-12-08 20:02:35] [email]pajoye@php.net[/email]
Please provide a working link to the image.
------------------------------------------------------------------------
[2006-12-08 20:02:21] [email]iliaa@php.net[/email]
You really should be using the imagecreatefromgif() function
in this instance. The URL with an image seems to be down, can
you provide a working URL for the file please.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39780[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest
-
pajoye@php.net #9
#39780 [Ana]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
Status: Analyzed
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
Ok, I found the problem.
It requires to add more jmp points in the png implementation. We have
only one now, forcing us to bail out immediately if an error occurred
after the image initialization (when the png headers are correct but
not the data/CRC).
I'm not sure if I can make it for 5.2.x but 6.x will return false.
Previous Comments:
------------------------------------------------------------------------
[2006-12-09 11:09:57] [email]pajoye@php.net[/email]
"Sure image is invalid. This is not the point. "
My point is to have the relelevant informations in the report instead
of letting us wondering what you are trying to do or achieve. And it is
a valid requirement.
"The function is specified as it ether returns image or FALSE on
error."
As I just said, I have to test further to see if it is safe to continue
the script execution.
------------------------------------------------------------------------
[2006-12-09 09:59:47] pz at mysqlperformanceblog dot com
Sure image is invalid. This is not the point.
The function is specified as it ether returns image or FALSE on error.
If it also can in case of error terminate script execution or format
the hard drive it is better to be specified in docs :)
Now regarding what I provide - the name of the file does not matter in
this case as image is created from memory buffer. I just gave you the
real image on which my thumbnail generation script failed.
Out of few millions of images processed many were malformed etc but in
most cases PHP handles it correctly by reporting FALSE and printing
appropriate warning. So at least this behavior is inconsistent.
------------------------------------------------------------------------
[2006-12-08 21:47:30] [email]pajoye@php.net[/email]
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
------------------------------------------------------------------------
[2006-12-08 20:17:42] pz at mysqlperformanceblog dot com
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
------------------------------------------------------------------------
[2006-12-08 20:02:35] [email]pajoye@php.net[/email]
Please provide a working link to the image.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39780[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest
-
pajoye@php.net #10
#39780 [Ana->Fbk]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
-Status: Analyzed
+Status: Feedback
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
Please try with this patch (against 5.2 cvs):
[url]http://pecl.php.net/~pierre/gdphpbug39780.txt[/url]
It raises (yes many ;) warnings instead of fatal errors.
Ilia, is it ok for 5.2?
Previous Comments:
------------------------------------------------------------------------
[2006-12-09 11:59:59] [email]pajoye@php.net[/email]
Ok, I found the problem.
It requires to add more jmp points in the png implementation. We have
only one now, forcing us to bail out immediately if an error occurred
after the image initialization (when the png headers are correct but
not the data/CRC).
I'm not sure if I can make it for 5.2.x but 6.x will return false.
------------------------------------------------------------------------
[2006-12-09 11:09:57] [email]pajoye@php.net[/email]
"Sure image is invalid. This is not the point. "
My point is to have the relelevant informations in the report instead
of letting us wondering what you are trying to do or achieve. And it is
a valid requirement.
"The function is specified as it ether returns image or FALSE on
error."
As I just said, I have to test further to see if it is safe to continue
the script execution.
------------------------------------------------------------------------
[2006-12-09 09:59:47] pz at mysqlperformanceblog dot com
Sure image is invalid. This is not the point.
The function is specified as it ether returns image or FALSE on error.
If it also can in case of error terminate script execution or format
the hard drive it is better to be specified in docs :)
Now regarding what I provide - the name of the file does not matter in
this case as image is created from memory buffer. I just gave you the
real image on which my thumbnail generation script failed.
Out of few millions of images processed many were malformed etc but in
most cases PHP handles it correctly by reporting FALSE and printing
appropriate warning. So at least this behavior is inconsistent.
------------------------------------------------------------------------
[2006-12-08 21:47:30] [email]pajoye@php.net[/email]
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
------------------------------------------------------------------------
[2006-12-08 20:17:42] pz at mysqlperformanceblog dot com
Here is the copy of the image:
[url]http://www.mysqlperformanceblog.com/files/misc/1.gif[/url]
It is actually PNG image even if it has gif extension.
Regarding what function I should use this is not the point - I created
simple test case to illustrate problem. In the real script it is used
completely different way.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39780[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest
-
pajoye@php.net #11
#39780 [Fbk->Csd]: Fatal error reported for recoverable error
ID: 39780
Updated by: [email]pajoye@php.net[/email]
Reported By: pz at mysqlperformanceblog dot com
-Status: Feedback
+Status: Closed
Bug Type: GD related
Operating System: Linux
PHP Version: 5.2.0
Assigned To: pajoye
New Comment:
This bug has been fixed in CVS.
Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
[url]http://snaps.php.net/[/url].
Thank you for the report, and for helping us make PHP better.
Previous Comments:
------------------------------------------------------------------------
[2006-12-09 12:05:48] [email]pajoye@php.net[/email]
Please try with this patch (against 5.2 cvs):
[url]http://pecl.php.net/~pierre/gdphpbug39780.txt[/url]
It raises (yes many ;) warnings instead of fatal errors.
Ilia, is it ok for 5.2?
------------------------------------------------------------------------
[2006-12-09 11:59:59] [email]pajoye@php.net[/email]
Ok, I found the problem.
It requires to add more jmp points in the png implementation. We have
only one now, forcing us to bail out immediately if an error occurred
after the image initialization (when the png headers are correct but
not the data/CRC).
I'm not sure if I can make it for 5.2.x but 6.x will return false.
------------------------------------------------------------------------
[2006-12-09 11:09:57] [email]pajoye@php.net[/email]
"Sure image is invalid. This is not the point. "
My point is to have the relelevant informations in the report instead
of letting us wondering what you are trying to do or achieve. And it is
a valid requirement.
"The function is specified as it ether returns image or FALSE on
error."
As I just said, I have to test further to see if it is safe to continue
the script execution.
------------------------------------------------------------------------
[2006-12-09 09:59:47] pz at mysqlperformanceblog dot com
Sure image is invalid. This is not the point.
The function is specified as it ether returns image or FALSE on error.
If it also can in case of error terminate script execution or format
the hard drive it is better to be specified in docs :)
Now regarding what I provide - the name of the file does not matter in
this case as image is created from memory buffer. I just gave you the
real image on which my thumbnail generation script failed.
Out of few millions of images processed many were malformed etc but in
most cases PHP handles it correctly by reporting FALSE and printing
appropriate warning. So at least this behavior is inconsistent.
------------------------------------------------------------------------
[2006-12-08 21:47:30] [email]pajoye@php.net[/email]
The image is invalid. Either the buffer is incomplete or the CRC is
wrong. You can try with different image viewers, the lower part will
miss, more or less depending on how tolerant is the reader.
It is also important to tell us directly what you provide, like a png
named as gif, it minimizes the time we need to test or analyze your
problem. If you used imagecreatefromgif it will simply fail, so yes,
which functions you use to open this image is important.
I will check if returning false is a safe choice. It should be but I
need to test it first.
------------------------------------------------------------------------
The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
[url]http://bugs.php.net/39780[/url]
--
Edit this bug report at [url]http://bugs.php.net/?id=39780&edit=1[/url]
pajoye@php.net Guest



Reply With Quote

