HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Increase Upload Size

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#68992 (In Topic #14630)
Avatar

Well-settled

Image unable to be uploaded

I can upload files through URL and images are selected for thumbnail views or regular pictures in general, but whenever I try to upload a picture, I get a message stating that the file is too large.

I'm trying to upload a thumbnail image for my photo gallery which is only 12 KB. Not sure how much smaller I could get.

I've changed the setting in the upload to be 8 MB for non-images and 5 MB for images, yet it doesn't seem to be working for me.

Any suggestions?


Thank you :)
Back to the top
 
Posted
Rating:
#69000
Avatar

Community saint

Hi Xarex,

It could be that the software detects a bad web request due to an upload limit being disabled

You have probably gone through all of these, but just in case here is a checklist of setups to look for with their admin location:

  • Is the GD image library enabled on the Server?
If there is no PHP GD extension on the server (no PHP graphics functionality - Officially ocPortal requires this), then and a number of very useful features will not work without it (such as automatic thumbnail generation).

    Check this with: » PHP info
(Located in Tools)    

» Use GD image library
(Located in Setup > Configuration > Site options > Environment)

  • » Maximum image size
The maximum width or height an image can be in pixels; this only works if the GD image library is enabled. If the image is too big, it will be resized.
(Located in Setup > Configuration > Feature options > Galleries)

  • » Maximum size
The maximum filesize a non-staff member can upload (in kilobytes).
(Located in Setup > Configuration > Site options > Upload)

  • » Valid file types
A comma-separated list (no spaces) of the file types which may be uploaded by users. Leave blank if you want to just apply core security restrictions, and nothing further.
(Located in Setup > Configuration > Security options > Uploaded files)

  • » Upload
These options control maximum upload file sizes. Maximum upload size depends on a number of factors:

    the PHP option post_max_size (currently 8 Mb)
    the PHP option upload_max_filesize (currently 16 Mb)
    the options here
    and, usergroup daily-upload-quotas (settable when editing usergroups).

(Located in Setup > Configuration > Site options)

  • Usergroup settings (available when adding/editing usergroups)
» Daily upload quota
The number of megabytes a member may upload within any 24 hour period (there is also a permission "Exceed the configured file-size/quota limit" that can bypass this).
(Located in Security > Usergroups)
Back to the top
 
Posted
Rating:
#69001
Avatar

Well-settled

Ah, blessed with the presence of the great Jean! :)

It was your theme tutorial that pushed me forward! Couldn't get anywhere without having some kind of body image!

PHP Tools: GD enabled.
Site Options: GD checked.
Maximum size: 8192
Images: 5120
Valid Image Types: jpg,jpeg,gif,png,ico

And the usergroups.. I believe all have the default 70 MB.


So the only problem, that might be a problem is:
Explain the possibility of exceeded data limits
Whether to show 'submission possibly too big'-style messages when the software detects a bad web request that could be due to an upload limit being disabled. Disable this option if you are confident you have configured your PHP liberally and do not want to confuse users with reference to such limits.) This was checked.

I have now unchecked it and hopefully that works. I'll be in touch, of course, if it doesn't.
Back to the top
 
Posted
Rating:
#69004
Avatar

Well-settled

Unfortunately, this did not work either.

The button is unchecked. I tried to upload a photo in my forums, a png file at 12 KB and got the message that the file size is too big.

I'm not sure where else to look to increase this file size other than the places you've listed.
Back to the top
 
Posted
Rating:
#69013
Avatar

Community saint

Hi Xarex!

Two more things come to mind:

A corrupted template.
Try replacing this template: ATTACHMENT_IMG.tpl
Or any of the Attachment templates.
You can find the originals by downloading the full package for your version and extract and ftp these files to the server.
Location on server: /themes/default/templates

A corrupted image location on your server.
Visit your server through its cPanel (or similar manager) or with your FTP and verify the 'uploads' folder and its sub-folders for anything wrong; like bad files; changed files permission, etc. (this is kind of last resort idea;))
Back to the top
 
Posted
Rating:
#69028
Avatar

Well-settled

Jean,

I always keep the original download file on my computer, so I unzipped that, and uploaded the ATTACHMENT_IMG.tpl file I found in the default -> templates folder into the one on my server.

I also opened up the Cpanel and looked at the file permissions, and everything inside that folder including the folder itself, is all set to 777.

And I'm still getting this error message.

I'm at a loss myself. In a way, I don't want users to be able to upload videos to my site, but rather just take the URL from other places.. so this stops that, but this also hinders me on uploading images to both my gallery and my forums.

Back to the top
 
Posted
Rating:
#69029
Avatar

Community saint

Allow me to butt-in for a moment with a 'wild' suggestion. Something I've experienced in the past, but something which I would never have thought to look for.

My issue was NOT with Galleries, but it had many similarities to what you are experiencing.

Ultimately, dealing with the Help Desk tech on my shared hosting he discovered that ALL my root folders, INCLUDING the 'adminzone' had somehow been set to 777, which in turn caused the server to reject just about everything I tried to upload - as you'd expect!

Never did get to the root cause of the issue, but resetting ALL the ROOT folder permissions to 755 (including the *custom* ones) fixed the problem.

Perhaps you can check this area?

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#69030
Avatar

Well-settled

Thank you Fletch for your suggestion, but this too, did not change anything.

This is all I keep getting.
Back to the top
 
Posted
Rating:
#69031
Avatar

Community saint

Hmmmm….. that's an OUCH!

I know I've experienced this before - just can't remember at the moment what I did to rectify the problem. And I know it has a solution - so I'll keep stirring up the old grey cells. Unless somebody gets there first.

BTW, took the 'invitation' from your screencap and visited your site. Big mistake on my part. All the vids and music are from my genre! Almost spent too much time indulging myself in nostalgia, and too little getting other things done!

Congrats.

 :thumbs:

Take my advice. I'm not using it!

View my working ocPortal site (version 9.x.x) at Anglo-Indian Portal
Back to the top
 
Posted
Rating:
#69038
Avatar

Well-settled

Thanks for visiting :).

Definitely needed something stable… tried PHP Fusion, WordPress, BuddyPress, Joomla, and each one of them had major errors that prevented me from even continuing on the site.. and I had to start all over again.

I am noticing errors in ocPortal CMS, but it's more quiet about it… especially with the public. So that's definitely a like I have with ocPortal.. it will do its best to still be a public site.

As for the concept and idea of the site… good times. I know there is definitely a huge community that loves the types of genre I have on my site.. so I'm looking to attract people to the site daily. Haven't seen too many community-oriented sites around psychedelia.


But I surely want to get the uploads operational so that members can contribute as well. Right now, I'm able to do everything through FTP uploading .. and then just adding the URL which the site recognizes and has no problem adding. So if you can think of anything, let me know.

I would think that because I'm an administrator, I could actually bypass the "max size upload", but apparently not.
Back to the top
 
Posted
Rating:
#69039
Avatar

Well-settled

I am curious where this is:

 (there is also a permission "Exceed the configured file-size/quota limit" that can bypass this).


I have not found this.

*EDIT: FOUND. And still no change.

In going to my Site Options screen, I looked at the numbers. They don't make sense.

  • the PHP option post_max_size (currently 8192 Gb)
  • the PHP option upload_max_filesize (currently 5120 Gb)

8,192 GB?
5,120 GB?

Isn't it supposed to be in kilobytes?

Maximum size


 

Images



I thought I listed these as:

8192kb = 8 MB
5120kb = 5 MB


Last edit: by Xarex
Back to the top
 
Posted
Rating:
#69043
Avatar

Looking at this now...


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69044
Avatar

It would help me to look on your server, your PHP post_max_size is getting misread by ocPortal I think, then ocPortal is trying to be smart and preempting harder-to-debug errors. I'd like to run some tests.
So if you agree please send FTP details to chris@ocportal.com.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#69045
Avatar

Community saint

Xarex said

    * the PHP option post_max_size (currently 8192 Gb)
    * the PHP option upload_max_filesize (currently 5120 Gb)
Look like the values in php.ini are set incorrectly.

As far as I know, that's the normal place where those two variable are set, and I don't think anything you do in ocPortal will change those.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69048
Avatar

Well-settled

Information sent Chris.

I can see where php.ini is located, but I have no clue how to get to it.

/usr/local/lib
Back to the top
 
Posted
Rating:
#69052
Avatar

Community saint

You should find one in /public_html/ and/or /public_html/mydomain.com/ .

If one doesn't exist just create it. It should contain:

    upload_max_filesize = 5M
    post_max_size = 8M

You php.ini files will override those parameters defined in /usr/local/lib, but just the parameters you add to it, so you only need to add what you want to change.

Do you have a Samsung Galaxy S / Galaxy S II ? If so, why not check out my ScreenFree FM Radio .
Back to the top
 
Posted
Rating:
#69081
Avatar

Well-settled

Chris was able to solve the solution through a few files. His conclusion was correct that it was being misread.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: