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 gregThomas - March 31, 2016

Hi Ragi,

Thanks for the detailed error reporting, I've taken a look at the code, and I think I might know what's causing this. 

Have you recently removed a section that contained an upload field? And if so, did you delete the schema directly from the schema directory? 

It looks like that error could be thrown if CMS Builder finds an unlinked upload that belongs to a section that no longer exists. If I can confirm the issue, I'll make sure that we resolve it in our next release. 

Cheers,

Greg

Greg Thomas







PHP Programmer - interactivetools.com

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 northernpenguin - April 4, 2016

Thanks Greg!

--
northernpenguin
Northern Penguin Technologies

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