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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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? 

Link to comment
Share on other sites

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

 

Yes I was online and saw it coming on my FTP connection.

It was 1.2 MB

I can only upload less than 200 kB

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.