The following warnings occurred:
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 783 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined variable $newpmmsg - Line: 40 - File: global.php(841) : eval()'d code PHP 8.1.27 (Linux)
File Line Function
/global.php(841) : eval()'d code 40 errorHandler->error
/global.php 841 eval
/printthread.php 16 require_once
Warning [2] Undefined array key "style" - Line: 909 - File: global.php PHP 8.1.27 (Linux)
File Line Function
/global.php 909 errorHandler->error
/printthread.php 16 require_once
Warning [2] Undefined property: MyLanguage::$lang_select_default - Line: 5024 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 5024 errorHandler->error
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key "additionalgroups" - Line: 7162 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 7162 errorHandler->error
/inc/functions.php 5044 is_member
/global.php 909 build_theme_select
/printthread.php 16 require_once
Warning [2] Undefined array key 1 - Line: 1415 - File: inc/functions.php PHP 8.1.27 (Linux)
File Line Function
/inc/functions.php 1415 errorHandler->error
/inc/functions.php 1370 fetch_forum_permissions
/printthread.php 76 forum_permissions
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error
Warning [2] Undefined array key "showimages" - Line: 160 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 160 errorHandler->error
Warning [2] Undefined array key "showvideos" - Line: 165 - File: printthread.php PHP 8.1.27 (Linux)
File Line Function
/printthread.php 165 errorHandler->error



Form Tools
storing files and data encrypted in database - Printable Version

+- Form Tools (https://forums.formtools.org)
+-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1)
+--- Forum: Feature Suggestions (https://forums.formtools.org/forumdisplay.php?fid=7)
+--- Thread: storing files and data encrypted in database (/showthread.php?tid=403)



storing files and data encrypted in database - moorezilla - Dec 21st, 2009

Two parter!

It would be nice if formtools could have options to:

1. Store uploaded files in mysql, rather than as files in a directory.
2. Store all submission information (including uploaded files!) in an encrypted format in mysql.


RE: storing files and data encrypted in database - Ben - Dec 24th, 2009

Hey Andy,

I've always steered clear of storing files in databases because I read (years ago) that it wasn't "Best Practice". Did you have a particular scenario in mind for this?

Regarding #2, you could simulate this through the Submission Pre-Parser module. You could encrypt whatever fields you want using whatever encryption method you fancy, right before it gets added into the DB. Just an idea!

- Ben


RE: storing files and data encrypted in database - moorezilla - Dec 29th, 2009

Hi Ben,

Happy Holidays!

You may very well be right that storing files in the database is not "best practice," as I am admittedly not an expert. It just seems to solve a few problems for me. Both of these suggestions spring from the same project.

We collect information from job applicants that could be considered sensitive. Since this information could be located in both form fields and in uploaded documents solicited through forms, I'm looking for a way to protect both at once.

Storing uploaded documents in mysql eliminates having a folder under the web root with all of the uploaded documents. Right now, I usually drop an extra .htaccess file in the directory to protect them, but this then requires an extra log in for people accessing these files either from links in emails or through the admin area of form tools.

Storing all data (including file uploads) encrypted in mysql solves all of my problems (at least in my mind!), since it eliminates the need to have a directory for file uploads in the web root, and it allows us to keep all information in an encrypted format on the server. Storing all data in an encrypted format is a directive that is coming down the pipe for us, so I'm trying to address it now.

Your suggestion to run an encryption routine before adding information to the database is great, but I thought it would be nice to have an option in form tools where you could click a checkbox and this would happen automagically. You might think this suggests that I am a lazy or inept programmer (you'd be correct!), but it's really a suggestion to make form tools even more robust and an even stronger agent of good in the fight against data piracy!

Let me know if I can add any additional information (or arguments!) for this.

Best,
am