Document file name file size

I believe there is a bug on scriptcase …
I have a Document file name field, when I try to select file of 1.3GB the system come with error

PHP Warning: Undefined array key “param_seq” in /var/www/html/scriptcase/app/cmges/import_sdi_omega/import_sdi_omega_ul_save.php on line 64

If file is less size it works
Anyone can help?

ps: I checked php.ini file and I have no problem on that

Hi. I am having the same issue. Did you find out what the cause was?

For others - This error occurs in a scriptcase supplied file that is used when you have a field that supports uploading of documents. It looks like a standard file whose name is <your_form_name>_ul_save.php. The problem appears on line 64 (as previously documented), and results in the error appearing at the conclusion of the upload.

The code in question is:

require(’…/_lib/lib/php/upload.class.php’);

if (!isset($_SESSION[‘sc_session’][ $_POST[‘param_seq’] ][‘sform_commsAttachment’][‘upload_field_info’]) || !isset($_SESSION[‘sc_session’][ $_POST[‘param_seq’] ][‘sform_commsAttachment’][‘upload_field_info’][ $_POST[‘param_field’] ]))
{
exit;
}

Either the array key ‘param_seq’ was not set up or it has been lost.

For me, this just started occurring in production without any application changes.

If anyone has any advice on where to start looking for answers, it would be appreciated.

Regards, Russell.

Hi Again.

An update - for me, this turned out to be an incorrectly set limit in the php.ini file. In my case this was caused by the incorrect restore of the ini file after I re-established the site.

If you are getting this error (missing index), you should check the file limits in play by using php_info().
Specifically ensure the following three have appropriate values:

  • upload_max_filesize = 16M
  • post_max_size = 16M ;
  • memory_limit = 32M ; Ensure this is larger than post_max_size - preferably 2x

(Do NOT take the above values as recommended. Think about what is appropriate for your site.)

As for the error itself, all I can say is that is a very obscure error given the cause. It seems to me that instead of just taking some open source code and slapping it into your product, NM, how about you actually think about what you are doing and wrap some checks around your code, so that if the file being uploaded is too large, tell us (or the user), instead of defaulting to this really stupid, careless error.

Regards.