Undefined index in ..../lib/upload_functions.php on line 720

5 posts by 2 authors in: Forums > CMS Builder
Last Post: April 4, 2016   (RSS)

By northernpenguin - March 30, 2016

I am using CMSB 3.02 (build 2060) with PHP 5.5.9.  When I add a new record and upload a PDF attachment (any attachment) I get the notice listed in the subject line (also see the attached screen shot.

The developer log has the following backtrace info:

#0  _errorlog_logErrorRecord() called at [/var/www/html/cmsb/lib/errorlog_functions.php:60]
#1  _errorlog_catchRuntimeErrors() called at [/var/www/html/cmsb/lib/upload_functions.php:720]
#2  removeExpiredUploads() called at [/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php:40]
#3  submitUploadForm() called at [/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php:20]
#4  require_once(/var/www/html/cmsb/lib/menus/default/uploadForm_functions.php) called at [/var/www/html/cmsb/lib/menus/default/uploadForm.php:3]
#5  include(/var/www/html/cmsb/lib/menus/default/uploadForm.php) called at [/var/www/html/cmsb/lib/menus/default/actionHandler.php:67]
#6  include(/var/www/html/cmsb/lib/menus/default/actionHandler.php) called at [/var/www/html/cmsb/admin.php:40]

It doesn't always happen.  The Notice seems to show up randomly.

Any ideas?

Ragi.

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By northernpenguin - March 31, 2016

Greg:  Not exactly.  I removed (deleted) an upload field and created a list field and a new upload field.  I did not manually touch the schema files.

Now I did notice that on my Ubuntu 14 system the ownership of all the ini.php files is www-data/www-data except for the _xxx files which is root/root.  Permissions for all the ini.php files is 666 (rw-rw-rw) except for the root owned ones which is 777 (rwxrwxrwx).  The directory is owned by root/root (drwxrwxrws - 777)

Ragi

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke

By gregThomas - April 4, 2016

Hi Ragi, 

Thanks for those extra details, I was able to recreate the issue in the latest build of CMS Builder. I've informed the lead developers about it, the problem will be resolved in the next release of CMS Builder.

The issue happens when you delete an upload field from a section that has uploads in it. The uploads aren't removed when the field is deleted causing an error to display when the upload clean up function runs next time you upload something.

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

By northernpenguin - April 4, 2016

Thanks Greg!

--
northernpenguin
Northern Penguin Technologies

"Any sufficiently advanced technology
is indistinguishable from magic."
........Arthur C. Clarke