Page 1 of 1

Files not uploading at all with Formbuilder

Posted: Thu Aug 02, 2018 10:33 am
by chrisaa
Hi all,

Hoping somebody here can help me with my issue. Had a search on the forums but couldn't find an answer or a similar issue.

I've used Form Builder to create a job application form, which then sends the result to the recruiter's email address. Everything on the form comes through fine, except for the uploading of a CV as a .doc or .docx file.

No attachment comes through with the email, but in the CV field it shows the name of the file that was uploaded. The files are meant to be uploaded to the uploads/CV folder, but nothing appears in that at all.

Any help would be much appreciated! Thanks

Site info:
----------------------------------------------

Cms Version: 2.2.7

Installed Modules:

AdminSearch: 1.0.4
CGBlog: 1.15.7
CGContentUtils: 2.2.2
CGExtensions: 1.61
CGSimpleSmarty: 2.1.8
CMSContentManager: 1.1.6
CMSMailer: 6.2.14
Captcha: 0.5.5
CmsJobManager: 0.1.2
DesignManager: 1.1.4
FileManager: 1.6.6
FilePicker: 1.0.2
FormBrowser: 0.5
FormBuilder: 0.8.1.6
JQueryTools: 1.4.0.3
MenuManager: 1.50.3
MicroTiny: 2.2.2
ModuleManager: 2.1.3
Navigator: 1.0.8
News: 2.51.3
Search: 1.51.4

Config Information:

php_memory_limit:
max_upload_size: 10000000
url_rewriting: mod_rewrite
page_extension:
query_var: page
auto_alias_content: true
locale:
set_names: true
timezone: GMT
permissive_smarty: false

Php Information:

phpversion: 7.0.30-0ubuntu0.16.04.1
md5_function: On (True)
json_function: On (True)
gd_version: 2
tempnam_function: On (True)
magic_quotes_runtime: Off (False)
E_ALL: 22527
E_STRICT: 0
E_DEPRECATED: 0
test_file_timedifference: No time difference found
test_db_timedifference: No time difference found
create_dir_and_file: 1
memory_limit: 128M
max_execution_time: 120
register_globals: Off (False)
output_buffering: 4096
disable_functions:
open_basedir:
test_remote_url: Success
file_uploads: On (True)
post_max_size: 10M
upload_max_filesize: 10M
session_save_path: /var/lib/php/sessions (1733)
session_use_cookies: On (True)
xml_function: On (True)
xmlreader_class: On (True)
check_ini_set: On (True)
curl: On

Performance Information:

allow_browser_cache: On (True)
browser_cache_expiry: 60
php_opcache: On (True)
smarty_cache: Off (False)
smarty_compilecheck: Off (False)
auto_clear_cache_age: On (True)
Server Information:

Server Software: Apache/2.4.18 (Ubuntu)
Server Api: apache2handler
Server Os: Linux 4.4.0-109-generic On x86_64
Server Db Type: MySQL (mysqli)
Server Db Version: 5.7.23
Server Db Grants: Found a "GRANT ALL" statement that appears to be suitable

Permission Information:

tmp: /var/www/html/tmp (0777)
tmp_cache: /var/www/html/tmp/cache (0777)
templates_c: /var/www/html/tmp/templates_c (0777)
modules: /var/www/html/modules (0755)
uploads: /var/www/html/uploads (0755)
File Creation Mask (umask): /var/www/html/tmp/cache (0777)
config_file: 0444
----------------------------------------------

Re: Files not uploading at all with Formbuilder

Posted: Thu Aug 02, 2018 11:13 am
by chrisaa
Just looking in the admin log comes up with this when I submit the form:
77.44.79.134 chris FormBuilder FormBuilder submit error: 2 Aug. 2018 10:27:43
77.44.79.134 chris FormBuilder submit error: Could not access file: /uploads/CV/SAMPLE CV DOCUMENT.docx 2 Aug. 2018 10:27:43
77.44.79.134 chris 1 Admin Username: chris Logged In 2 Aug. 2018 10:16:20
FormBuilder submit error: SMTP Error: The following recipients failed: you@yourdomain.com: This domain is not hosted here 2 Aug. 2018 09:49:29
Core CMSMS version 2.2.8 is available 1 Aug. 2018 23:03:15
Core CMSMS version 2.2.8 is available 31 Jul. 2018 21:44:52
Core CMSMS version 2.2.8 is available 30 Jul. 2018 21:25:29
FormBuilder submit error: SMTP Error: The following recipients failed: you@yourdomain.com: This domain is not hosted here
the last one SMTP error isn't from the test form I sent

Re: Files not uploading at all with Formbuilder

Posted: Thu Aug 02, 2018 2:23 pm
by DIGI3
Perhaps use filenames without spaces, and make sure the CV folder has the correct permissions/ownership for writing.

Re: Files not uploading at all with Formbuilder

Posted: Thu Aug 02, 2018 3:02 pm
by chrisaa
Thanks DIGI3, I tried both of those with no luck. permissions on uploads/CV is now 777.

I had a look in the error.log for submitting the form just now. I think the issue is somewhere here but I'm not very experienced, it's a little hard to know where to start.
[Thu Aug 02 14:51:57.257709 2018] [:error] [pid 1676] [client 77.44.79.134:50850] PHP Notice: session_start(): ps_files_cleanup_dir: opendir(/var/lib/php/sessions) failed: Permission denied (13) in /var/www/html/lib/misc.functions.php on line 1276, referer: https://website.com/
[Thu Aug 02 14:54:05.276571 2018] [:error] [pid 2341] [client 77.44.79.134:50937] PHP Notice: Undefined index: input_captcha in /var/www/html/tmp/templates_c/FormBuilder^b0659d02ad1b203aa3e41d342af5160056429a53_0.module_db_tpl.FormBuilder;fb_4.php on line 169, referer: https://website.com/2018/07/test-form
[Thu Aug 02 14:54:05.276647 2018] [:error] [pid 2341] [client 77.44.79.134:50937] PHP Notice: Trying to get property of non-object in /var/www/html/tmp/templates_c/FormBuilder^b0659d02ad1b203aa3e41d342af5160056429a53_0.module_db_tpl.FormBuilder;fb_4.php on line 169, referer: https://website.com/2018/07/test-form
[Thu Aug 02 14:54:54.506029 2018] [:error] [pid 2350] [client 77.44.79.134:50959] PHP Warning: move_uploaded_file(/uploads/CV/SAMPLECVDOCUMENT.docx): failed to open stream: No such file or directory in /var/www/html/modules/FormBuilder/classes/Form.class.php on line 2891, referer: https://website.com/test-form
[Thu Aug 02 14:54:54.506102 2018] [:error] [pid 2350] [client 77.44.79.134:50959] PHP Warning: move_uploaded_file(): Unable to move '/tmp/phpIWUwUy' to '/uploads/CV/SAMPLECVDOCUMENT.docx' in /var/www/html/modules/FormBuilder/classes/Form.class.php on line 2891, referer: https://website.com/test-form
[Thu Aug 02 14:54:54.511919 2018] [:error] [pid 2350] [client 77.44.79.134:50959] PHP Warning: finfo_file(/uploads/CV/SAMPLECVDOCUMENT.docx): failed to open stream: No such file or directory in /var/www/html/modules/FormBuilder/classes/DispositionEmailBase.class.php on line 76, referer: https://website.com/test-form
[Thu Aug 02 14:54:54.512302 2018] [:error] [pid 2350] [client 77.44.79.134:50959] PHP Notice: Undefined variable: res in /var/www/html/modules/FormBuilder/classes/DispositionEmailBase.class.php on line 92, referer: https://website.com/test-form
I will keep investigating

Re: Files not uploading at all with Formbuilder

Posted: Fri Aug 03, 2018 1:17 pm
by chrisaa
All relevant permissions are correct, still no files being uploaded through FormBuilder. Uploading works fine with any of the other modules.

Looking at this thread:

I'm suspecting there are still compatibility issues with FormBuilder and the newest versions of CMSMS? I see for example this bug report on forge: http://dev.cmsmadesimple.org/bug/view/11736

Would there be a similar value that needed to be change for my uploading problem with FormBuilder? My error log shows a few different. undefined variables
Fri Aug 03 13:06:09.681127 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Warning: finfo_file(/var/www/html/uploads/SAMPLECVDOCUMENT.docx): failed to open stream: No such file or directory in /var/www/html/modules/FormBuilder/classes/DispositionEmailBase.class.php on line 76, referer: https://website.com/test-form
[Fri Aug 03 13:06:09.681376 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Notice: Undefined variable: res in /var/www/html/modules/FormBuilder/classes/DispositionEmailBase.class.php on line 92, referer: https://website.com/test-form
[Fri Aug 03 13:06:09.682194 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Notice: Undefined index: fld_43 in /var/www/html/tmp/templates_c/95c66f80f212c1b168e7779a85af36d6e4c2c207_0.string.php on line 38, referer: https://website.com/test-form
[Fri Aug 03 13:06:09.682207 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Notice: Trying to get property of non-object in /var/www/html/tmp/templates_c/95c66f80f212c1b168e7779a85af36d6e4c2c207_0.string.php on line 38, referer: https://website.com/test-form
[Fri Aug 03 13:06:09.682518 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Notice: Undefined index: fld_43 in /var/www/html/tmp/templates_c/95c66f80f212c1b168e7779a85af36d6e4c2c207_0.string.php on line 38, referer: https://website.com/test-form
[Fri Aug 03 13:06:09.682530 2018] [:error] [pid 11481] [client 77.44.79.134:58180] PHP Notice: Trying to get property of non-object in /var/www/html/tmp/templates_c/95c66f80f212c1b168e7779a85af36d6e4c2c207_0.string.php on line 38, referer: https://website.com/test-form
I'd be very appreciative of any experienced help! I have almost 0 experience in php so this is pretty hard going, but i'm prepared to keep working till this is sorted. Or let me know what information i need to provide to better get help here.

Re: Files not uploading at all with Formbuilder

Posted: Fri Aug 03, 2018 2:31 pm
by chrisaa
Ok, so I changed the owner of my website root directory to www-data. Fixed the issue.

Hopefully will take not so long for me to work things out next time!

Re: Files not uploading at all with Formbuilder

Posted: Mon Aug 13, 2018 8:35 pm
by creativeguy
Hello,

I am having the same issue with files not uploading or attaching to emails. How and where did you fix the issue?

Thanks,
Kevin