Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.


Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Upload large files fails with Undefined variable: status

Go to End

9 Posts   3533 Views


2 December 2008 at 1:44am Community Member, 70 Posts


I just mentioned this in the IRC room, but my IRC client is playing silly beggars today and keeps disconnecting, so before I write a support ticket I hoped someone might see this one.

I'm trying to test the upload functionality of SS, and have come across a bug with uploading of large files.

I'm running the new 2.3.0 RC2 install and everything else seems to be working fine - images under 2Mb will upload with no issues.

When upload is clicked on a large file (say 5Mb), the iframe with the upload function shows an error page:

[Notice] Undefined variable: status
POST /admin/assets/UploadForm

Line 225 in /cms/code/AssetAdmin.php

It appears that line 225 is trying to test against the 'status' variable, then display a 'nothing to upload' status message:

} else if($status != 'bad') {
$statusMessage = _t('AssetAdmin.NOTHINGTOUPLOAD','There was nothing to upload');
$status = "";

I know that my php install is set to allow up to 2Mb files, and don't want to be changing that right now. The CMS should be giving the user a proper error telling them that nothing was uploaded.

Anyone know how to get round this so that it fails nicely if it has to fail at all?


3 December 2008 at 2:06am Community Member, 70 Posts

Could someone else who is running 2.3 RC2 have a try at uploading a large file to their install?

I've logged it as a ticket in the bug system anyway - it's kind of a blocker for me to be able to release to a client when it does this.


3 December 2008 at 5:14am Community Member, 787 Posts

Hi Les..

Tried a big image upload. (3,5 mb)

Works for me.

I have my PHP max-file-size limit set up way high though.


3 December 2008 at 5:38am Community Member, 70 Posts

Erm, thanks Fuzz10, but maybe I didn't make it clear:

I can upload large files when I change the php.ini file, but only up to the maximum value set. Anything over that bails out with the error message I have issues with.

If anyone can test this with a file larger than their php setting, it'd be much appreciated.


3 December 2008 at 9:23pm Community Member, 787 Posts

Ah.. hmmkay... Read your post a little too quickly there... ;-)

Tested and confirmed .. Same behaviour here...


9 December 2008 at 3:23am Community Member, 70 Posts

Thanks for the confirmation Fuzz10 - I tried a fresh install this weekend and it's still doing the same thing.

I'm going to start poking around in the code to see if I can fix this, but if there are any core team members out there that might be a bit more knowledgeable about this section and can help, then it would be much appreciated!


9 December 2008 at 3:38am 4085 Posts

Maybe I'm being naive, but why are you expecting to successfully upload a file that exceeds the max_upload_size in your php.ini?

For enhanced upload features, try out my SWFUpload extension. It automatically filters out files that are too large to upload.
</shamless plug>


9 December 2008 at 3:47am Community Member, 70 Posts

Hi UncleCheese,

Nice plug for SWFUpload (I'll take a look), but I'm not expecting a successful upload.

What I am expecting is a user-friendly fail if they try to upload a large file - currently it shows a pretty crappy error that would completely stump the regular users of a CMS.

And yes you can explain till you're blue in the face that the users need to only upload a file of a certain size, but they'll forget the moment you mention it.

Go to Top