Author Topic: Error uploading images  (Read 7400 times)

0 Members and 1 Guest are viewing this topic.

Offline 5degrees

  • Newbie
  • *
  • Posts: 24
    • View Profile
Error uploading images
« on: November 14, 2008, 12:14:39 PM »
I have read through some previous forum threads but cannot find the same issue as I am experiencing

Via the admin GUI I initially tried to upload a JPG file (3008x2000 1.8Mb) but it failed and although I didnt get an error message, the top section of the 'add image' page showed 'image*' in red.

I changed the file to a GIF and tried to upload - same problem.

I have checked the restrictions on file type and dimension/size and the image comes within all of the parameters.

I have also checked permissions on the storage folders and it looks okay (chmod 777 on 'other')

Any other ideas?

Offline Nicky

  • Administrator
  • 4images Guru
  • *****
  • Posts: 3.195
    • View Profile
Re: Error uploading images
« Reply #1 on: November 14, 2008, 01:02:14 PM »
hi,

maybe your php max_execution_time is to short(standard 30sec) and you are maybe on slow internet connection where you can't upload this 1.8Mb file in this time..

look over admin cp, link phpinfo().

btw. that will be server settings
cheers
Nicky
Your first three "must do" before you ask a question ! (© by V@no)
- please read the Forum Rules ...
- please study the FAQ ...
- please try to Search for your answer ...

nicky.net 4 4images
Signature stolen from mawenzi

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error uploading images
« Reply #2 on: November 14, 2008, 03:47:08 PM »
If I'm not mistaken its either post_max_size or upload_max_filesize php settings that could have such affect.
Go to phpinfo() and look for these two settings. If they too low, ask your host administrator to increase them.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline 5degrees

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Error uploading images
« Reply #3 on: November 14, 2008, 09:32:15 PM »
Hi, thanks for the points - I am totally out of my comfort zone with PHP!!

max_execution_time =30 (seconds I believe, this should be plenty to upload 2Mb as I have a decent cable DSL connection)
post_max_size = 8M (certainly all photos are less than that)
upload_max_filesize = 2M (all files so far have been less than 2Mb)

With the advice (that server settings could impact on uploading files) then I suppose I need to try smaller files which are quicker to upload

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error uploading images
« Reply #4 on: November 15, 2008, 01:48:21 AM »
If small files upload with no problem, my bet would be on upload_max_filesize setting.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline 5degrees

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Error uploading images
« Reply #5 on: November 15, 2008, 02:25:59 PM »
I got to the bottom of it,  it was the 30secs limit of max_execution_time which was causing the problem.

I spoke to my hosting provider and they replied as follows (which was to be expected)... :cry:

"We regret to inform you that we cannot change the default PHP settings on our servers. If we increase the 'max_execution_time' or 'upload_max_filesize' it will effect the performance of the server <server IP> very badly. It will increase the load on the server causing downtime for many of the sites."

But I still want to get my larger images on the site so I was wondering if the following would work...

...if I create a folder on the website called 'store' and then uploaded the images via FTP so when I add files to 4images I use the URL section instead of the file upload and then just put URL of the file - http://<mysite>/store/<filename.jpg>

Will this work?
« Last Edit: November 15, 2008, 06:39:42 PM by 5degrees »

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: Error uploading images
« Reply #6 on: November 15, 2008, 08:37:28 PM »
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline 5degrees

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: Error uploading images
« Reply #7 on: November 15, 2008, 09:19:08 PM »
Many thanks

Found the Batch Upload From ZIP file which works a treat as well