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.
I'm using it on a site I just made to upload and resize an image. It works great on my local machine but when I put the site live on hosting ( 1and1 :( ) it doesn't resize the image.
I get no errors or warnings, the log says no image processing wanted.
I'm using the latest version of the script and the upload part is working great, just not the resize part.
Is this just because of the 1and1 hosting or is there anything in the script I could change?
system information - class version : 0.31 - operating system : Linux - PHP version : 5.4.0beta1 - GD version : 2.0.34 - supported image types : png gif bmp - open_basedir : no restriction - upload_max_filesize : 2M (2097152 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 defaults to /usr/share/file/magic MIME type detected as application/octet-stream; charset=binary by Fileinfo PECL extension - 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 : 46441_105380692856750_100001544593647_41557_257748_n.jpg file_src_name_body : 46441_105380692856750_100001544593647_41557_257748_n file_src_name_ext : jpg file_src_pathname : /tmp/phpLAQHAe file_src_mime : image/jpeg file_src_size : 115373 (max= 2097152) file_src_error : 0 process file to /kunden/homepages/10/d254907565/htdocs/public/images/covers/ - file size OK - file mime OK : image/jpeg - file name safe format - destination variables file_dst_path : /kunden/homepages/10/d254907565/htdocs/public/images/covers/ file_dst_name_body : 46441_105380692856750_100001544593647_41557_257748_n file_dst_name_ext : jpg - checking for auto_rename - destination file details file_dst_name : 46441_105380692856750_100001544593647_41557_257748_n.jpg file_dst_pathname : /kunden/homepages/10/d254907565/htdocs/public/images/covers/46441_105380692856750_100001544593647_41557_257748_n.jpg - 46441_105380692856750_100001544593647_41557_257748_n.jpg doesn't exist already - no image processing wanted - process OKReply
Another update, after some debugging I found that the file isn't being recognised as an image so when the function checks to see if any processing is needed, the is_image variable is set to false preventing the processing.
Any idea why it's not recognising my image file as an image on my hosting account?Reply
First thing, thanks for the class,it's brilliant!
I'm using it on a site I just made to upload and resize an image. It works great on my local machine but when I put the site live on hosting ( 1and1 :( ) it doesn't resize the image.
I get no errors or warnings, the log says no image processing wanted.
I'm using the latest version of the script and the upload part is working great, just not the resize part.
Is this just because of the 1and1 hosting or is there anything in the script I could change?
Thanks in advance for any help
- class version : 0.31
- operating system : Linux
- PHP version : 5.4.0beta1
- GD version : 2.0.34
- supported image types : png gif bmp
- open_basedir : no restriction
- upload_max_filesize : 2M (2097152 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 defaults to /usr/share/file/magic
MIME type detected as application/octet-stream; charset=binary by Fileinfo PECL extension
- 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 : 46441_105380692856750_100001544593647_41557_257748_n.jpg
file_src_name_body : 46441_105380692856750_100001544593647_41557_257748_n
file_src_name_ext : jpg
file_src_pathname : /tmp/phpLAQHAe
file_src_mime : image/jpeg
file_src_size : 115373 (max= 2097152)
file_src_error : 0
process file to /kunden/homepages/10/d254907565/htdocs/public/images/covers/
- file size OK
- file mime OK : image/jpeg
- file name safe format
- destination variables
file_dst_path : /kunden/homepages/10/d254907565/htdocs/public/images/covers/
file_dst_name_body : 46441_105380692856750_100001544593647_41557_257748_n
file_dst_name_ext : jpg
- checking for auto_rename
- destination file details
file_dst_name : 46441_105380692856750_100001544593647_41557_257748_n.jpg
file_dst_pathname : /kunden/homepages/10/d254907565/htdocs/public/images/covers/46441_105380692856750_100001544593647_41557_257748_n.jpg
- 46441_105380692856750_100001544593647_41557_257748_n.jpg doesn't exist already
- no image processing wanted
- process OK
This way around gives the error...
- error: Error copying file on the server. copy() failed.
Any idea why it's not recognising my image file as an image on my hosting account?
- supported image types : png jpg gif bmp
Can you output here the result of the two following lines?
array(12) {
["GD Version"]=>
string(27) "bundled (2.0.34 compatible)"
["FreeType Support"]=>
bool(true)
["FreeType Linkage"]=>
string(13) "with freetype"
["T1Lib Support"]=>
bool(false)
["GIF Read Support"]=>
bool(true)
["GIF Create Support"]=>
bool(true)
["JPEG Support"]=>
bool(false)
["PNG Support"]=>
bool(true)
["WBMP Support"]=>
bool(true)
["XPM Support"]=>
bool(false)
["XBM Support"]=>
bool(true)
["JIS-mapped Japanese Font Support"]=>
bool(false)
}
Told this company never to go with 1and! Grr