php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #53096 imagecopyresized doesn't return TRUE or FALSE
Submitted: 2010-10-18 14:34 UTC Modified: 2010-10-19 18:38 UTC
From: yugenekr at gmail dot com Assigned:
Status: Not a bug Package: GD related
PHP Version: 5.3.3 OS: Linux 2.6.35-ARCH
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: yugenekr at gmail dot com
New email:
PHP Version: OS:

 

 [2010-10-18 14:34 UTC] yugenekr at gmail dot com
Description:
------------
I'm getting about 650 pictures in bytes by soap and creating previews for those 
pictures. Script works perfectly on php 5.3.2-2 (Linux Debian testing), but stops 
unexpectedly on php 5.3.3 without any error.
I've found that script stops on function imagecopyresized. (pls, see test script 
example) - doesn't return anything.

Test script:
---------------
if(imagecopyresized($imageResized, $imageTmp, 0, 0, 0, 0, $newWidth, $newHeight, $width, $height)){
                echo "imagecopyresized true";
            }else{
                echo "imagecopyresized FALSE";
            }


Expected result:
----------------
1. All pictures and previews stored. (1300 files for both).
2. function imagecopyresampled return something

Actual result:
--------------
1. Only about 880 files are stored.
2. function imagecopyresampled doesn't return anything

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-10-19 12:44 UTC] uramihsayibok at gmail dot com
Run your script with error_reporting(-1) and display_errors on. Look for error 
messages.

Are you hitting a memory limit? Up memory_limit and see if that makes a 
difference. If you aren't cleaning up variables (eg, using imagedestroy()) you 
should do so.
 [2010-10-19 12:55 UTC] pajoye@php.net
-Status: Open +Status: Feedback
 [2010-10-19 12:55 UTC] pajoye@php.net
Or please provide one image and script to reproduce your problem (one of the 400~ failing).
 [2010-10-19 17:21 UTC] yugenekr at gmail dot com
-Status: Feedback +Status: Open
 [2010-10-19 17:21 UTC] yugenekr at gmail dot com
Thanks a lot, I was totally stupid not using error_reporting(-1).
After seeing errors (not a jpg file and execution time exceeded), I just had to
1.check if I process a real image/jpeg file
2.use ini_set('max_execution_time', '60');
 [2010-10-19 17:22 UTC] yugenekr at gmail dot com
-Status: Open +Status: Closed
 [2010-10-19 17:22 UTC] yugenekr at gmail dot com
Closed as not a bug.
 [2010-10-19 18:38 UTC] pajoye@php.net
-Status: Closed +Status: Bogus
 [2010-10-19 18:38 UTC] pajoye@php.net
Not a bug > bogus
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 11 13:01:28 2025 UTC