Jump to content

php upload suddenly don't accept files > 200 kB


sirugo

Recommended Posts

I have a simple upload script (from W3 Schools) for my site that I have been using for years to upload photos to my site.

Suddenly it only allows files less than about 200 kB, and I have not changed anything.

 

When I try to upload larger files the script never terminates in the browser (no error messages). I have tried different browsers and computers (Mac OS X though). I have also resetted the browsers (cache etc). Small files work like they should but the bigger one do not.

 

I contacted my host (online help) and they tried my script. It worked for them! They could upload big files too.

 

What can the problem be here?

 

Thanks in advance

What do you or they have your php.ini memory limit set to?

 

Two interesting links I found last week were

http://forums.devshed.com/php-development-5/imagecreatefromjpeg-causes-memory-error-667236.html

http://www.webdeveloper.com/forum/showthread.php?182328-imagecreatefromjpeg-is-eating-memory

 

If I remember correctly and did it correctly my 2.91mb photo took up almost 71mb. As a poster noted you definitely want to use imagedestroy

What do you or they have your php.ini memory limit set to?

 

Two interesting links I found last week were

http://forums.devshed.com/php-development-5/imagecreatefromjpeg-causes-memory-error-667236.html

http://www.webdeveloper.com/forum/showthread.php?182328-imagecreatefromjpeg-is-eating-memory

 

If I remember correctly and did it correctly my 2.91mb photo took up almost 71mb. As a poster noted you definitely want to use imagedestroy

 

Can php.ini really solve this?

I mean - the support guy tried my script and it worked for him.

If my ini-settings had been wrong, the script wouldn't have worked at all, right?

Can php.ini really solve this?

I mean - the support guy tried my script and it worked for him.

If my ini-settings had been wrong, the script wouldn't have worked at all, right?

 

I would think so, are you sure your provider used a photo that was large enough for the test upload? 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.