Forums

Unable to Upload .docx

mdtechteam-jb 18 Oct, 2016
First off, I just wanted to say great product. This is by far my favorite form creator for Joomla.

I am facing a problem with uploading .docx files. I have a test form setup with only File Uploads enabled. Here are my settings:

Label Text: Upload
Field Name: upload
Field ID: upload


And my Events configuration:
Enabled: Yes
Fields Configuration: upload:docx-pdf
Upload Path: JOOMLA_PATH/components/com_chronoforms/uploads/test
Max Size: 2000
Min Size: 1
Remaining settings are default


There are no issues when I upload a .pdf file. Here's an output from the debugger:
Data Array: 
Array
(
    [chronoform] => test
    [event] => submit
    [upload] => 
    [input_submit_2] => Submit
    [02f49870467e8aab85f7491d17b84269] => 1
)
Validation Errors: 
Array
(
)
Debug Data
Upload routine started for file upload by : upload
/home/content/71/11495371/html/components/com_chronoforms/uploads/test/20161018080122_pdf-sample.pdf has been uploaded successfully.


The problem arises when I try to upload a .docx file. As soon as I hit submit, I get a blank page with "ERR_EMPTY_RESPONSE". It seemingly stuns the site for a few seconds.

I've gone into Global Configuration > Media Manager and verified docx, and DOCX are listed as Legal Extensions. I also upgraded from 4.0 RC3.5.2.4 to 4.0.7_J3. I know that docx uploading does work for the site.. it just seems to fail with Chronoforms. Any help is appreciated. Thank you.
GreyHead 18 Oct, 2016
Hi goose,

I don't know of any particular problems with docx files. Please take a Form Backup using the icon in the Forms Manager and post it here and I'll take a closer look and see if it works on my test site.

Bob
mdtechteam-jb 18 Oct, 2016
Hello GreyHead, thank you for the reply. Please find the attached backup.
GreyHead 18 Oct, 2016
Hi goose,

It appears to be working OK - see here - the only changes I made were to move the Debugger actions to the end of each event.

Maybe there is a security setting on your server that is blocking /docx files?

Bob
mdtechteam-jb 18 Oct, 2016
Do you happen to have any idea what I could check in terms of security settings?
GreyHead 18 Oct, 2016
Hi goose,

Sorry, no - maybe an .htaccess or a mod_security setting. Can your web-host help?

You could try adding a custom code action with code like this in the beginning of the On Submit event to see if that shows anything useful
<?php
echo'<div>$_FILES: '.print_r($_FILES, true).'</div>';
?>

Bob
mdtechteam-jb 24 Oct, 2016
Hello GreyHead, I did want to follow up with a solution of sorts. I contact GoDaddy, who immediately said it was a Joomla/ChronoForms issue. This didn't make sense to me. I created a simple PHP form in the root of my site, bypassing Joomla entirely. This had the same results; all uploads were successfully except .docx files. I endured several calls with GoDaddy, until I finally spoke to someone who had an idea of what was going on. He explained that there were security vulnerabilities with the .docx mime-type, and consequently they prohibited them from being uploaded. So it has been confirmed to be a server side issue. Thank you again for your assistance.
GreyHead 24 Oct, 2016
Hi goose,

Thanks for the update. I'm not too surprised, GoDaddy are one of the 'stricter' hosts in my experience (and that's probably justified given the wide range of sites they host).

Bob
This topic is locked and no more replies can be posted.