com_chronoforms [tmpl] => component [chronoform] => uploadBI [event] => submit [Itemid] => )Validation Errors:Array()Data Array:Array( [option] => com_chronoforms [tmpl] => component [chronoform] => uploadBI [event] => submit [Itemid] => )Validation Errors:Array()Error 2Wrong text---- I put some debugger in the onsubmit event (see the attached image)."Error 2 / wrong text" is the message associated with Custom Server Side Validation OnFail event. That is somewhat unexpected. That validation is about the textbox (a simple if($form->data['mytextbox']!="abc") then return false;) not the file.I expected a possible error in the OnFail of Upload Files (3).I checked the log files on the server (I don't have full access to the log files, I can view only an excerpt) but there's no message about any kind of upload error.Any clue on what's going on here?thank you maxx"> Error uploading big file - Forums

Forums

Error uploading big file

emmexx 29 Jun, 2012
I have a problem with a form when I try to upload big files.
The form is very simple:
- a file upload element
- a textbox
- a submit button

In the Onsubmit event I put a "custom server side validation" where I check the textbox value.
In the On success part I put an "Upload Files" action.
The max file size is 100000 KB.

The server php.ini file size limit is 50MB.

If I try to upload small files (I checked up to 2-3 MB) everything is ok. Then I tried with 10MB, 27MB, 38MB and I get an error.

This is what I get:

Data Array:

Array
(
    [option] => com_chronoforms
    [tmpl] => component
    [chronoform] => uploadBI
    [event] => submit
    [Itemid] => 
)

Validation Errors:

Array
(
)

Data Array:

Array
(
    [option] => com_chronoforms
    [tmpl] => component
    [chronoform] => uploadBI
    [event] => submit
    [Itemid] => 
)

Validation Errors:

Array
(
)

Error 2

Wrong text

----



I put some debugger in the onsubmit event (see the attached image).
"Error 2 / wrong text" is the message associated with Custom Server Side Validation OnFail event. That is somewhat unexpected. That validation is about the textbox (a simple if($form->data['mytextbox']!="abc") then return false;) not the file.
I expected a possible error in the OnFail of Upload Files (3).

I checked the log files on the server (I don't have full access to the log files, I can view only an excerpt) but there's no message about any kind of upload error.

Any clue on what's going on here?

thank you
maxx
GreyHead 30 Jun, 2012
Hi maxx,

Not sure of the detail but the Error Code 2 probably refers to the PHP File Upload error

Value: 2; The uploaded file exceeds the MAX_FILE_SIZE directive that was specified in the HTML form.

See here.

It may be that the PHP limit is 5Mb rather than 50? What do you see in the Site Admin System Info tab?

Bob
emmexx 02 Jul, 2012

Not sure of the detail but the Error Code 2 probably refers to the PHP File Upload error



Sorry for the misunderstanding. Error 2 is the message I put in the "Show Thanks Message".
I don't think it is a php error as it would've been more verbose.
I put the show thank messages in the On fail event in order to trace errors.

It may be that the PHP limit is 5Mb rather than 50?



Unfortunately not:
File Uploads 	upload_max_filesize 	Maximum allowed size for uploaded files. 	50M


I tried to upload a 9.6 MB file using the media management section of joomla (max file size 10MB) and it failed with a joomla.json file to save. 😲

What do you see in the Site Admin System Info tab?


I didn't change anything there so I see the default values. Anyway there's no reference to un upload limit.

Apart from the limits imposed by joomla or my host, my message here is a request for help as it is a chronoforms bug submission.
I mean, I think that some (php) error is not being managed correctly by chronoforms.
I removed actions (debugger and show thanks message) from the onfail event of
Custom Server Side Validation. I tried to upload a 28MB file and expected to see some kind of error by chronoforms, joomla or php. Instead this is what I got:
Data Array:

Array
(
    [option] => com_chronoforms
    [tmpl] => component
    [chronoform] => uploadBI
    [event] => submit
    [Itemid] => 
)

Validation Errors:

Array
(
)


Thank you
maxx
GreyHead 02 Jul, 2012
Hi Maxx,

The problem here is that the ChronoForms file uploader works OK - you know that because it uploads the smaller files. Actually it lets PHP handle the upload and then moves and renames the file.

I would expect to see some other things in the Debugger code, the $_FILES array should be there plus debug output from ChronoForms moving the file.

You can see the PHP.ini files from the Site Admin System Info pages please check what limits are showing there.

Bob
emmexx 02 Jul, 2012

You can see the PHP.ini files from the Site Admin System Info pages please check what limits are showing there.



Thank you Bob.
I already gave you that number on my previous post. Anyway, since I wanted to be sure, I checked it using phpinfo():
upload_max_filesize	50M


In my previous message I copied a wrong error: I had tried to upload a file with the wrong extension. Sorry.

I made another test. I copied the previous form and deleted all the actions. Now there's only the upload file event and 2 messages for onSuccess and Onfail.
I tried to upload a file with the wrong extension (the same as before, a 28 MB file) and the result is a blank page and the chronoform link (I'm using the Test Form button).
Then I tried to upload a 23 MB file with a permitted extension. Again blank page and no file uploaded.
Then I enabled the joomla system debug and tried to upload the same file. Blank page, chronoforms link, footer with joomla debug info with just labels and not values (session, database queries, ecc.)

I'm disappointed. :?

Thank you
maxx
emmexx 02 Jul, 2012

I made another test.



Other tests.
Added a debugger to OnSubmit
Tried to upload a 7.7 MB file: uploaded
Tried to upload a 11.1 MB file: no upload:

Data Array:
Array
(
    [option] => com_chronoforms
    [tmpl] => component
    [chronoform] => uploadBI-Copy
    [event] => submit
    [Itemid] => 
    [_PLUGINS_] => Array
        (
            [upload_files] => Array
                (
                )
        )
)
Validation Errors:
Array
(
)


Is there any link between the size of uploadable files in joomla media menager (10 MB) and the behaviour of chronoforms?

maxx
This topic is locked and no more replies can be posted.