Image resizing or conversion works on Windows but not on Linux VPS

See all posts See thread Reply

Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by surz, 8 years, 5 months ago
[root@vps 2]# php -i | grep memory
memory_limit => 128M => 128M
Collecting memory statistics => No
opcache.memory_consumption => 128 => 128
opcache.preferred_memory_model => no value => no value
opcache.protect_memory => 0 => 0


Log File:

system information
- class version : 0.33dev
- operating system : Linux
- PHP version : 7.0.6
- GD version : GD not present
- supported image types : none
- 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
- Fileinfo PECL extension deactivated
- Checking MIME type with UNIX file() command
    UNIX file() command failed
- Checking MIME type with mime.magic file (mime_content_type())
    MIME type detected as image/png by mime_content_type()
- MIME validated as image/png
source variables
- You can use all these before calling process()
    file_src_name : images.png
    file_src_name_body : images
    file_src_name_ext : png
    file_src_pathname : /tmp/phpALfJTC
    file_src_mime : image/png
    file_src_size : 8298 (max= 2097152)
    file_src_error : 0
process file to /var/www/uploads/2/
- file size OK
- file mime OK : image/png
- new file name body : profile
- file name safe format
- destination variables
    file_dst_path : /var/www/uploads/2/
    file_dst_name_body : profile
    file_dst_name_ext : png
- no auto_rename if same filename exists
- destination file details
    file_dst_name : profile.png
    file_dst_pathname : /var/www/uploads/2/profile.png
- no overwrite checking
- no image processing wanted
- process OK
process file to /var/www/uploads/2/
- file size OK
- file mime OK : image/png
- new file name body : profile_thumbnail
- file name safe format
- destination variables
    file_dst_path : /var/www/uploads/2/
    file_dst_name_body : profile_thumbnail
    file_dst_name_ext : png
- no auto_rename if same filename exists
- destination file details
    file_dst_name : profile_thumbnail.png
    file_dst_pathname : /var/www/uploads/2/profile_thumbnail.png
- no overwrite checking
- no image processing wanted
- process OK
cleanup
- delete temp file /tmp/phpALfJTCReply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by colin, 8 years, 5 months ago
GD is not installed on your VPSReply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by surz, 8 years, 5 months ago
Sorry but I did not get what GD meansReply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by colin, 8 years, 5 months ago
You need to install/enable GD, a library for PHP, on your VPS.
http://php.net/manual/en/book.image.phpReply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by surz, 8 years, 5 months ago
Many thanks Colin,
You were right, I've installed the php-gd module and it has started working like charm.
WOW! you saved my day :) wish you have a great time ahead!Reply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by surz, 8 years, 5 months ago
Now that you have seen the code and the log file, do you suggest any code improvement or it looks good to you?Reply
Re: Image resizing or conversion works on Windows but not on Linux VPS new!
by colin, 8 years, 5 months ago
Looks good to me!Reply