Forum

Thread tagged as: Problem, Forms

Unable to download a file after uploaded with Perch Forms

Hi,

I'm trying to download some files uploaded through the Perch Forms app. When I click on the file name in the control panel to download the file, the admin page doesn't react (or appears to bounce to the top of the page). As an aside, I can download the csv file of all form responses.

I checked and the files are uploaded correctly to the non public location on the server as set in the path configuration in the form app.

Perch is generating this url on the filename link: https://conservationactionresearch.net/perch/addons/apps/perch_forms/responses/detail/?id=632&file=project_file

When I click on the link and have perch_debug set to true I get this message

Time    Δ   Debug Message - Perch Runway 3.0.5
0.0045  0   [1] SELECT u.*, r.* FROM perch2_users u, perch2_user_roles r WHERE u.roleID=r.roleID AND u.userEnabled=1 AND u.userID=1 AND u.userHash='1ecba617aa44a252930e4d30e58f3fa9' LIMIT 1
0.0058  0.0012  UPDATE perch2_users SET userHash='d9ea47ac100f2ebbe992ca03b5b7b7dc' WHERE userID='1'
0.0064  0.0006  [40] SELECT p.privKey FROM perch2_user_privileges p
0.0076  0.0012  [53] SELECT settingID, settingValue, userID FROM perch2_settings WHERE userID=1 OR userID=0 ORDER BY userID ASC
0.0098  0.0022  [7] SELECT itemValue FROM perch2_menu_items WHERE itemType='app'
0.0114  0.0016  [1] SELECT * FROM perch2_forms_responses WHERE responseID='632' LIMIT 1
0.0122  0.0008  [1] SELECT * FROM perch2_forms WHERE formID='9' LIMIT 1
0.0147  0.0025  [1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 0, 1
0.0154  0.0007  [2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=1 ORDER BY mi.itemOrder ASC
0.0164  0.001   [1] SELECT itemTitle FROM perch2_menu_items WHERE itemType='app' AND itemValue='perch_forms' LIMIT 1
0.0171  0.0007  [1] SELECT * FROM perch2_menu_items WHERE itemActive=1 AND itemType='menu' AND parentID=0 ORDER BY itemOrder ASC LIMIT 1, 10
0.0177  0.0006  [2] SELECT mi.*, p.privKey FROM perch2_menu_items mi LEFT JOIN perch2_user_privileges p ON mi.privID=p.privID WHERE mi.itemActive=1 AND mi.parentID=2 ORDER BY mi.itemOrder ASC
0.0186  0.0009  File: /addons/apps/perch_forms/modes/response.detail.post.php
0.021   0.0024  Queries: 13
0.0211  0.0001  Memory: 0.8071
0.0212  0.0001  
Array
(
    [type] => 8
    [message] => Trying to get property of non-object
    [file] => /var/www/conservationactionresearch.net/html/perch/addons/apps/perch_forms/modes/response.detail.pre.php
    [line] => 21
)

Here are my summary diagnostics

Perch Runway: 3.0.5, PHP: 7.0.15-0ubuntu0.16.04.4, MySQL: mysqlnd 5.0.12-dev - 20150407 - $Id: b5c5906d452ec590732a93b051f3827e02749b83 $, with PDO
Server OS: Linux, apache2handler
Installed apps: content (3.0.5), assets (3.0.5), categories (3.0.5), perch_forms (1.9)
App runtimes: <?php $apps_list = array( 'perch_forms', );
PERCH_LOGINPATH: /perch
PERCH_PATH: /var/www/conservationactionresearch.net/html/perch
PERCH_CORE: /var/www/conservationactionresearch.net/html/perch/core
PERCH_RESFILEPATH: /var/www/conservationactionresearch.net/html/perch/resources
Image manipulation: GD Imagick
PHP limits: Max upload 128M, Max POST 128M, Memory: 256M, Total max file upload: 128M
F1: 0c66c2e1f82f9e0b7617b2cb8270f2c7
Resource folder writeable: Yes
HTTP_HOST: conservationactionresearch.net
DOCUMENT_ROOT: /var/www/conservationactionresearch.net/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php

And the php modules running on the server.

core mod_so mod_watchdog http_core mod_log_config mod_logio mod_version mod_unixd mod_access_compat mod_alias mod_auth_basic mod_authn_core mod_authn_file mod_authz_core mod_authz_host mod_authz_user mod_autoindex mod_deflate mod_dir mod_env mod_filter mod_headers mod_mime prefork mod_negotiation mod_php7 mod_rewrite mod_setenvif mod_socache_shmcb mod_ssl mod_status

I hope this is clear and please let me know if any other info will be helpful. And much thanks for your help.

Scott Gruber

Scott Gruber 0 points

  • 4 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Does Forms 1.9.1 help with this at all?

Yes, Forms 1.9.1 fixed it.

The site uses the Perch form's app to offer scholarships o help African students conduct research in the Congo Basin. With over 211 applicants this year you've helped us make it much easier to match applicant to their docs.

Thank you very much.