Welcome Guest, Not a member yet? Register   Sign In
Image Upload issue
#1

[eluser]Ihms[/eluser]
Hi there,

I am having issues uploading images in my server environment. Small sized images are no problem, They get resized cropped and watermarked. But as soon as I try a image of size bigger than 2000px width or height I run into an HTTP 500 error.

What could this be?I checked my server upload size limit is 16M. Cant figure it out?
Everything works 100% on my local machine and on the server.Only bigger images bomb out!!


Coffee doesnt even do the trick no more!

Any help would be greatly appreciated..
#2

[eluser]Krzemo[/eluser]
Have you checked web server and/or php error logs?
Upload size might be sufficient but what about script memory?

Regs
K.
#3

[eluser]Ihms[/eluser]
Thanks for the reply..

I have come accross my error log and found:
PHP Fatal error: Allowed memory size of 33554432 bytes exhausted
(tried to allocate 3200 bytes) in /home/ihmsmedi/public_html/system/libraries/Image_lib.php on line 515,


and in Image_lib.php on line 515
$dst_img = $create($this->width, $this->height);


Is there anyway to increase the the memory size on the server?
I really need to allow for big images to be uploaded!


Thanks for the advice.

Regds
IHMS
#4

[eluser]Krzemo[/eluser]
php.ini memory_limit
#5

[eluser]sackbut[/eluser]
Also check
upload_max_filesize

Is it your own server or are you sharing space ?
#6

[eluser]Ihms[/eluser]
I share space on the server.

I fixed the issue by adding this line to my .htaccess file

php_value memory_limit "64M"

never thought that that could work?
Any suggestions?
#7

[eluser]sackbut[/eluser]
I share space too and it's pretty well locked down so cannot twiddle php.ini or adjust PHP params via .htaccess. I had two issues. The first was the upload size (upload_max_filesize) which was 2Mb. The hosting company changed it to 8Mb. Then once the upload was working I got exactly the same message as you when I tried to process pictures bigger than about 150kB (resize, rotate etc...). They said to install PHP FastCGI onto my account (they have a service which does this). After that it worked fine.
sackbut
#8

[eluser]Ihms[/eluser]
Yeah..they got it on a lockdown..
2MB is next to nothin..
Pretty weird though.. After I placed this "php_value memory_limit “64M”" into my .htaccess under the root, its working fine.
I can upload massive images and do all the adjustments to em now!

Dont get it tho!

IHMS
#9

[eluser]sackbut[/eluser]
Know what you mean - like me, you want to understand what's going on.
I'm not keen on using .htaccess at root unless absolutley necessary since the machine checks all the folders under root to see if the .htaccess entries apply, and it can slow things down a bit.
Still - at least it works now !
Sackbut




Theme © iAndrew 2016 - Forum software by © MyBB