The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
500 Internal server error - register globals - export files
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'
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:
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? Wink

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?

POST /myformtools/modules/export_manager/export.php HTTP/1.1
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
Cookie __atuvc=1|20; PHPSESSID=57079f0e85d1741023120ac151bbf928
Content-Type application/x-www-form-urlencoded
Content-Length 44

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/; charset=UTF-8

Formtools version 2.2.5
Export manager version 2.1.1

Thanks in advance!

Forum Jump:

Users browsing this thread: 1 Guest(s)