class.upload.php is a powerful and mature PHP class to manage uploaded files, and manipulate images in many ways. The script is available under a GPL license.
When trying to create an additional thumbnail image using the image_resize = true setting, this makes apache crash immediately after calling process(). Unfortunately, nothing is written into the error.log.
Here's the class.upload log dumped into a file immediately before calling process(): (I've star-ed the path names for protection)
system information - class version: 0.31 - operating system: WINNT - PHP version: 5.3.5 - GD version: 2.0.34 - supported image types: png jpg gif bmp - open_basedir: no restriction - upload_max_filesize: 128M (134217728 bytes) - language: en_GB source is an uploaded file - upload OK - file name OK determining MIME type - Checking MIME type with Fileinfo PECL extension Fileinfo PECL extension not available - Checking MIME type with UNIX file() command UNIX file() command not availabled - Checking MIME type with mime.magic file (mime_content_type()) MIME type detected as application/octet-stream by mime_content_type() - MIME validated as application/octet-stream - Flash may be rewriting MIME as application/octet-stream - Try to guess MIME type from file extension (jpg): MIME type set to image/jpeg source variables - You can use all these before calling process() file_src_name: comp12.jpg file_src_name_body: comp12 file_src_name_ext: jpg file_src_pathname: *******\php46F5.tmp file_src_mime: image/jpeg file_src_size: 22519 (max= 134217728) file_src_error: 0 - source file is an image image_src_x: 184 image_src_y: 250 image_src_pixels: 46000 image_src_type: jpg image_src_bits: 8 process file to *******\ - file size OK - file mime OK: image/jpeg - file name safe format - destination variables file_dst_path:*******\ file_dst_name_body: comp12 file_dst_name_ext: jpg - checking for auto_rename - destination file details file_dst_name: comp12.jpg file_dst_pathname: *******\comp12.jpg - comp12.jpg doesn't exist already - no image processing wanted - process OKReply
I am afraid I don't use Windows at all, and don't support the class on Windows systems, so I am not sure to be able to help further without some sort of error log produced by your system.Reply
I understand what you mean, but I think we can get it to work. ;) It worked smoothly until now under Windows. I will try to increase the memory limit to something very huge, just for testing.Reply
Works okay with PNG, so it seems to be a problem with the GD. For those having a problem like this, too, I will post it here if I find a solution. Thanks anyway. ;)Reply
Here's the class.upload log dumped into a file immediately before calling process(): (I've star-ed the path names for protection)
system information
- class version: 0.31
- operating system: WINNT
- PHP version: 5.3.5
- GD version: 2.0.34
- supported image types: png jpg gif bmp
- open_basedir: no restriction
- upload_max_filesize: 128M (134217728 bytes)
- language: en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
Fileinfo PECL extension not available
- Checking MIME type with UNIX file() command
UNIX file() command not availabled
- Checking MIME type with mime.magic file (mime_content_type())
MIME type detected as application/octet-stream by mime_content_type()
- MIME validated as application/octet-stream
- Flash may be rewriting MIME as application/octet-stream
- Try to guess MIME type from file extension (jpg): MIME type set to image/jpeg
source variables
- You can use all these before calling process()
file_src_name: comp12.jpg
file_src_name_body: comp12
file_src_name_ext: jpg
file_src_pathname: *******\php46F5.tmp
file_src_mime: image/jpeg
file_src_size: 22519 (max= 134217728)
file_src_error: 0
- source file is an image
image_src_x: 184
image_src_y: 250
image_src_pixels: 46000
image_src_type: jpg
image_src_bits: 8
process file to *******\
- file size OK
- file mime OK: image/jpeg
- file name safe format
- destination variables
file_dst_path:*******\
file_dst_name_body: comp12
file_dst_name_ext: jpg
- checking for auto_rename
- destination file details
file_dst_name: comp12.jpg
file_dst_pathname: *******\comp12.jpg
- comp12.jpg doesn't exist already
- no image processing wanted
- process OK
I am afraid I don't use Windows at all, and don't support the class on Windows systems, so I am not sure to be able to help further without some sort of error log produced by your system.
I will try to increase the memory limit to something very huge, just for testing.
$image_src = @imagecreatefromjpeg($this->file_src_pathname);
Maybe it's a problem with the GD lib. I'll try with a PNG image...
http://www.wampserver.com/phorum/read.php?2,65228
So it seems to be a problem with PHP, neither class.upload nor Apache. Just as a conclusion. ;)