php - Codeigniter Image Resize and Crop Error on big images -


im using basic php server 8gb ram, running lamp server.

i have codeigniter v3 running , upload small images , crop resize them on fly easy.

but if upload images bigger 540 x 540 following error

a php error encountered

severity: warning

message: imagecreatetruecolor(): gd warning: product of memory allocation multiplication exceed int_max, failing operation gracefully  filename: libraries/image_lib.php  line number: 807  backtrace:  file: /home/boomboomdead/public_html/application/controllers/file.php line: 127 function: crop  file: /home/boomboomdead/public_html/application/controllers/file.php line: 173 function: generate_thumbs  file: /home/boomboomdead/public_html/index.php line: 292 function: require_once  php error encountered  severity: warning  message: imagealphablending() expects parameter 1 resource, boolean given  filename: libraries/image_lib.php  line number: 811  backtrace:  file: /home/boomboomdead/public_html/application/controllers/file.php line: 127 function: crop  file: /home/boomboomdead/public_html/application/controllers/file.php line: 173 function: generate_thumbs  file: /home/boomboomdead/public_html/index.php line: 292 function: require_once  php error encountered  severity: warning  message: imagesavealpha() expects parameter 1 resource, boolean given  filename: libraries/image_lib.php  line number: 812  backtrace:  file: /home/boomboomdead/public_html/application/controllers/file.php line: 127 function: crop  file: /home/boomboomdead/public_html/application/controllers/file.php line: 173 function: generate_thumbs  file: /home/boomboomdead/public_html/index.php line: 292 function: require_once  php error encountered  severity: warning  message: imagecopyresampled() expects parameter 1 resource, boolean given  filename: libraries/image_lib.php  line number: 815  backtrace:  file: /home/boomboomdead/public_html/application/controllers/file.php line: 127 function: crop  file: /home/boomboomdead/public_html/application/controllers/file.php line: 173 function: generate_thumbs  file: /home/boomboomdead/public_html/index.php line: 292 function: require_once 

i not know do, because on local computer works sweet. mean uploded 3000 x 2000 photo , crops great.

im on mac book pro, 8gb memory there on remote server, going wrong

i fixed similar issue reducing amout of characters in filename.


Comments

Popular posts from this blog

facebook - android ACTION_SEND to share with specific application only -

python - Creating a new virtualenv gives a permissions error -

javascript - cocos2d-js draw circle not instantly -