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.
error : Can't create the temporary file. Can't carry on a process.system information - class version : 0.33dev - operating system : Linux - PHP version : 5.4.45-0+deb7u2 - GD version : 2.0.36 - supported image types : png jpg gif bmp - open_basedir : no restriction - upload_max_filesize : 100M (104857600 bytes) - language : en_GB source is an uploaded file - upload OK - file name OK determining MIME type - Checking MIME type with Fileinfo PECL extension MAGIC path will not be used MIME type detected as by Fileinfo PECL extension - Checking MIME type with UNIX file() command MIME type detected as ERROR: cannot open `/tmp/phpjWWVIk' (No such file or directory) by UNIX file() command - Checking MIME type with mime.magic file (mime_content_type()) MIME type detected as by mime_content_type() - Checking MIME type with getimagesize() getimagesize() failed - MIME type detected as image/png by browser - MIME validated as image/png - can't read source file directly. open_basedir restriction in place? source variables - You can use all these before calling process() file_src_name : image_resized_3.png file_src_name_body : image_resized_3 file_src_name_ext : png file_src_pathname : /tmp/phpjWWVIk file_src_mime : image/png file_src_size : 118470 (max= 104857600) file_src_error : 0 - source file is an image image_src_x : image_src_y : image_src_pixels : image_src_type : png image_src_bits : process file to tmp/ - file size OK - file mime OK : image/png - no image properties available, can't enforce dimension checks : image/png - new file name ext : png - new file name body : SAM_THM_909365642 - file name safe format - destination variables file_dst_path : tmp/ file_dst_name_body : SAM_THM_909365642 file_dst_name_ext : png - checking for auto_rename - destination file details file_dst_name : SAM_THM_909365642.png file_dst_pathname : tmp/SAM_THM_909365642.png - SAM_THM_909365642.png doesn't exist already - attempting to use a temp file: failed - error: Can't create the temporary file. Can't carry on a process.Reply
Re: "Can't create the temporary file. Can't carry on a process" new!
I'm bumping this thread as it's one of the topresults on Google when searching for this exact error. For me it was caused by a wrongly structured files array when using the codeexample for multifile upload (found under the faq). I was simply to fast when "stealing" the snippet and doing some cleanup (ie. adding curly-brackets to the IF block), and assumed that the two lines just after the IF block belonged to that scope - as it was indented as such. At last I found that this was not true - only the first line is a result of a true statement.
Maybe the faq could be updated to not have an indent on the line "$files[$i][$k] = $v;" or maybe add some brackets. I know that only the first line after the IF sentence will be executed if true and no brackets are put in, but maybe I'm not the only one, who has been banging my head for hours on this error.
Sorry for my bad english but I have a problem and I don't understand why.
If I up small images I have no error but if my image is bigger than 1,5Mo... "Can't create the temporary file. Can't carry on a process".
My php.ini is configured like this :
php_value memory_limit = 40M
upload_max_filesize = 4M
post_max_size = 30M
max_execution_time = 60
Thanks for your help
Can you copy here the output from $foo->log? Also, do you have a link to a phpinfo() on your server?
error : Can't create the temporary file. Can't carry on a process.system information
- class version : 0.33dev
- operating system : Linux
- PHP version : 5.4.45-0+deb7u2
- GD version : 2.0.36
- supported image types : png jpg gif bmp
- open_basedir : no restriction
- upload_max_filesize : 100M (104857600 bytes)
- language : en_GB
source is an uploaded file
- upload OK
- file name OK
determining MIME type
- Checking MIME type with Fileinfo PECL extension
MAGIC path will not be used
MIME type detected as by Fileinfo PECL extension
- Checking MIME type with UNIX file() command
MIME type detected as ERROR: cannot open `/tmp/phpjWWVIk' (No such file or directory) by UNIX file() command
- Checking MIME type with mime.magic file (mime_content_type())
MIME type detected as by mime_content_type()
- Checking MIME type with getimagesize()
getimagesize() failed
- MIME type detected as image/png by browser
- MIME validated as image/png
- can't read source file directly. open_basedir restriction in place?
source variables
- You can use all these before calling process()
file_src_name : image_resized_3.png
file_src_name_body : image_resized_3
file_src_name_ext : png
file_src_pathname : /tmp/phpjWWVIk
file_src_mime : image/png
file_src_size : 118470 (max= 104857600)
file_src_error : 0
- source file is an image
image_src_x :
image_src_y :
image_src_pixels :
image_src_type : png
image_src_bits :
process file to tmp/
- file size OK
- file mime OK : image/png
- no image properties available, can't enforce dimension checks : image/png
- new file name ext : png
- new file name body : SAM_THM_909365642
- file name safe format
- destination variables
file_dst_path : tmp/
file_dst_name_body : SAM_THM_909365642
file_dst_name_ext : png
- checking for auto_rename
- destination file details
file_dst_name : SAM_THM_909365642.png
file_dst_pathname : tmp/SAM_THM_909365642.png
- SAM_THM_909365642.png doesn't exist already
- attempting to use a temp file: failed
- error: Can't create the temporary file. Can't carry on a process.
Maybe the faq could be updated to not have an indent on the line "$files[$i][$k] = $v;" or maybe add some brackets. I know that only the first line after the IF sentence will be executed if true and no brackets are put in, but maybe I'm not the only one, who has been banging my head for hours on this error.
Other than that - Wow! This is a nice class!