Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am unable to download the form submissions. The issue queue lists several similar bug reports, and I have read them all without being able to identify the problem. I have 15 submissions in the webform.
A few facts on my server setup:
Server | Apache/2.2.11 (Unix) PHP/5.2.9 |
---|---|
error_reporting | E_ALL |
memory_limit | 256M |
safe_mode | Off |
max_execution_time | 180 |
disable_functions | readfile,shell_exec,exec,virtual,passthru,proc_close,proc_get_status,proc_open,proc_terminate,system |
When I click the download button the file is downloaded immediately (i.e. no wait for some timeout), but it is empty. Nothing is written to the error log file. It does not work on other sites on the same server either.
I have another server with a similar setup, but results export works on this server.
Any ideas on how to track down the error?
Comments
Comment #1
haaid CreditAttribution: haaid commentedwe have the same issue on our site
Drupal Version: 6.19
Webform version: 6.x-2.10
We had 10 results before the upgrade; after the upgrade we registered one more (shows up in "submissions") but the download file is empty (both delimited text and excel).
Happy to provide more info.
Comment #2
quicksketchInformation on how to reproduce this issue from a clean installation for Drupal will be necessary; I can't reproduce this.
Comment #3
vernond CreditAttribution: vernond commentedAre you sure that your sites temp directory is writable? Webform creates the report in a temp file prior to download, if this is not created it could explain the problem.
Perhaps you should test this by adding a file upload component to one of your forms and check that it does upload correctly?
Comment #4
ulrikls CreditAttribution: ulrikls commentedThe temp directory exists and is writable. I tried adding a file upload component to a new form. File upload works just fine, but results download not.
Comment #5
vernond CreditAttribution: vernond commentedOops, just spotted my oversight: readfile is a disabled function on your server... it is also the function that webform uses to stream the temp file to client side. You'll have to beg and plead with your server admin to enable readfile.
Comment #6
quicksketch@vernond is correct. Webform can't make a POST request generate a download file without readfile(). I think requesting the function or changing hosts is your best option.
Comment #7
ulrikls CreditAttribution: ulrikls commentedI got my server admin to enable readfile, and now results download works. Thanks for your help.
Comment #9
danharper CreditAttribution: danharper commentedHow do enable readfile(), can it be done in php.ini?
I have searched the internet and although I can find all the information about the function I can't work out how you can turn it on or off.
Cheers Dan
Comment #10
danharper CreditAttribution: danharper commentedFound it in php.ini the following line.
disable_functions =
Cheers Dan
Comment #11
surya.sairaam CreditAttribution: surya.sairaam as a volunteer commentedHi, Just make sure that your hosting is not full eg: 100mb hosting and you have already 99mb. On this time you will have the same type of problem.