The following warnings occurred: | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Warning [2] Undefined array key "avatartype" - Line: 783 - File: global.php PHP 8.1.31 (Linux)
|
500 Internal server error - register globals - export files - Printable Version +- Form Tools (https://forums.formtools.org) +-- Forum: Form Tools (https://forums.formtools.org/forumdisplay.php?fid=1) +--- Forum: API (https://forums.formtools.org/forumdisplay.php?fid=17) +--- Thread: 500 Internal server error - register globals - export files (/showthread.php?tid=2014) |
500 Internal server error - register globals - export files - thisdude - May 24th, 2012 Hi all First of all, thanks to all developers who made this wonderful component. It has proven to be very useful!! However, I'm experiencing some issues, and was wondering if someone could help; When I generate exports (xml, xls, doesn't matter) formtools generates a 500 INTERNAL SERVER ERROR HTTP response code. (If the export group 'action' setting is configured 'open in a new window') The user is not able to download the file, and firefox reports 'Firefox can't find the file at http://www.example.com/myformtools/modules/export_manager/export.php.' However, if i inspect the payload, the content with submissions is actually in place. I did some debugging and found out at what line it fails: global/code/modules.php around line 756 function ft_include_module($module_folder) foreach ($GLOBALS as $key => $val) { @eval("global \$$key;"); } this function is called in export_manager\export.php in one of the first statements If i uncomment this line 756, everything works as expected, i get HTTP status 200 OK and the file can be downloaded. I think I also know why: register globals is enabled When register globals is disabled, there is no issue and the response code is also 200 OK probably it tries to re-register already registered globals? ... am I clear here? Could this be fixed by adding a check if-register-globals-enabled => do not execute the loop else => execute the loop Or should i report a bug for this? REQUEST HEADERS --------------- POST /myformtools/modules/export_manager/export.php HTTP/1.1 Host http://www.example.com User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:12.0) Gecko/20100101 Firefox/12.0 Accept text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8 Accept-Language en-us,en;q=0.5 Accept-Encoding gzip, deflate Referer http://www.example.com/myformtools/admin/forms/submissions.php?form_id=24 Cookie __atuvc=1|20; PHPSESSID=57079f0e85d1741023120ac151bbf928 Content-Type application/x-www-form-urlencoded Content-Length 44 RESPONSE HEADERS ---------------- HTTP/1.0 500 Internal Server Error Date Thu, 24 May 2012 10:48:38 GMT Server Apache/2.2 X-Powered-By PHP/5.2.17 Expires Thu, 19 Nov 1981 08:52:00 GMT Cache-Control max-age=0 Pragma public Content-Disposition attachment; filename=submissions-May.24.xls Connection close Content-Type application/vnd.ms-excel; charset=UTF-8 Formtools version 2.2.5 Export manager version 2.1.1 Thanks in advance! |