View Issue Details

This bug affects 1 person(s).
 6
IDProjectCategoryView StatusLast Update
05400Bug reportsImport/Exportpublic2011-08-29 06:43
Reporteruser15286Assigned Toadamzammit  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.91+ 
Fixed in Version1.91+ 
Summary05400: QueXML export on Windows Server (IIS)
Description

Hi,

I have 2 webservers with limeusurvey setup. One of them is a Linux box and the other is a Windows Server 2008 with IIS 7.0 + PHP 5.2.14 + MySQL 5

QueXML export is working fine on the linux box whereas once I run it on windows it gives a "Server Error: Connection reset".

FIREFOX ERROR:
The connection was reset
The connection to the server was reset while the page was loading.

INTERNET EXPLORER ERROR:
blank page.

CHROME:
HTTP Error 500 (Internal Server Error): An unexpected condition was encountered while the server was attempting to fulfil the request.

I have tested it on Windows 7 + IIS 7.5 + PHP 5.3.6 and the problem persists.

Any info on resolving this issue would be helpful

Thanks

Steps To Reproduce

Perform 'QueXML export' with the setup specified above.

TagsNo tags attached.
Bug heat6
Complete LimeSurvey version number (& build)10695
I will donate to the project if issue is resolvedNo
BrowserChrome 13.0, Firefox 5.0, IE 8.0
Database type & versionMySQL 5
Server OS (if known)Windows Server 2008 SP 1
Webserver software & version (if known)IIS 7.0
PHP Version5.2.14 or 5.3.6

Users monitoring this issue

There are no users monitoring this issue.

Activities

mot

mot

2011-08-17 14:17

reporter   ~16082

Please enable PHP error logging on the windows box and check the PHP error log. Check the webservers error log as well.

The error logs should contain more information why the request crashes. I assume some memory limit or probably missing functions.

user15286

2011-08-17 14:41

  ~16083

Hi, The PHP log file returns multiple copies of the following

[17-Aug-2011 13:22:02] PHP Notice: Undefined index: questions in C:\inetpub\wwwroot\SiriusNewestTesting\admin\classes\quexml\quexmlpdf.php on line 1182
[17-Aug-2011 13:22:02] PHP Notice: Undefined index: questions in C:\inetpub\wwwroot\SiriusNewestTesting\admin\classes\quexml\quexmlpdf.php on line 1201
[17-Aug-2011 13:22:02] PHP Warning: array_slice() expects parameter 1 to be array, null given in C:\inetpub\wwwroot\SiriusNewestTesting\admin\classes\quexml\quexmlpdf.php on line 1201
[17-Aug-2011 13:22:02] PHP Warning: Invalid argument supplied for foreach() in C:\inetpub\wwwroot\SiriusNewestTesting\admin\classes\quexml\quexmlpdf.php on line 1201

PHP memory_limit is set to 128M per script.

mot

mot

2011-08-17 17:56

reporter   ~16084

PHP Notices and Warnings are not the cause of a 500 error, more the Fatal error ones. What does your webserver log shows?

user15286

2011-08-18 11:29

  ~16088

Ok. I enabled failed request tracing on IIS and this is what it spit out.

  1. — FASTCGI_WAITING_FOR_RESPONSE 08:41:41.647

  2. i MODULE_INFORMATION ModuleName="FastCgiModule", Data1="FASTCGI_SETSTATUS", Data2="500 Internal Server Error", ErrorCode="The operation completed successfully. (0x0)" 08:41:56.647

  3. r MODULE_SET_RESPONSE_ERROR_STATUS
    Warning ModuleName="FastCgiModule", Notification="EXECUTE_REQUEST_HANDLER", HttpStatus="500", HttpReason="Internal Server Error", HttpSubStatus="0", ErrorCode="The operation completed successfully. (0x0)", ConfigExceptionInfo="" 08:41:56.647

  4. i FASTCGI_RESPONSE_WRITTEN 08:41:56.647

  5. — NOTIFY_MODULE_COMPLETION ModuleName="FastCgiModule", Notification="EXECUTE_REQUEST_HANDLER", NotificationStatus="NOTIFICATION_CONTINUE" 08:41:56.647

Is there a specific FastCGI error log?
I tried enabling fastcgi.logging in php.ini but no errors seem to be logged

adamzammit

adamzammit

2011-08-23 07:36

developer   ~16114

I am not familiar with IIS / PHP on Windows - but can you please try the following:

Are you able to export to queXML using the following method:

"Display/Export" -> "Export Survey" -> "queXML survey XML format (*.xml)"

This should just export a queXML file (not the PDF/associated files)

Also can you please confirm that you have set the temporary directory permissions correctly

user15286

2011-08-26 13:18

  ~16158

Hi,

Yes, I can export to queXML and get just the .xml file.

All permissions ( for \tmp ) are set correctly since I can import templates, surveys, groups etc..

user15286

2011-08-26 15:45

  ~16164

Figured it out.

Firstly:

I am running on Version 1.91+ Build 10695 so whenever I run the queXML + PDF export it complained about the following

C:\inetpub\wwwroot\limesurvey\admin\classes\tcpdf\tcpdf.php on line 7586 Deprecated: Function ereg() is deprecated in

and

it was missing definition for setFontSubsetting() which was supposed to be in the TCPDF lib.

I had to copy class\TCPDF from Version 1.91+ Build 10746. Now works fine!

Secondly:

A (smaller) problem was in the admin/quexmlsurvey.php

the line:
header("Content-Length: $len; \n"); \ unix new-line
had to be replaced with :
header("Content-Length: $len");

additionally had to flush the buffer before returning the file. e.g:

ob_clean();
flush();
readfile($zipfile);

This caused problem when the server was trying to send the requested file.

adamzammit

adamzammit

2011-08-29 06:43

developer   ~16175

Thanks for reporting the required changes to quexmlsurvey.php. I have made those changes in revision 10888.

Issue History

Date Modified Username Field Change
2011-08-17 14:15 user15286 New Issue
2011-08-17 14:17 mot Note Added: 16082
2011-08-17 14:17 mot Status new => feedback
2011-08-17 14:24 c_schmitz Assigned To => adamzammit
2011-08-17 14:24 c_schmitz Status feedback => assigned
2011-08-17 14:41 user15286 Note Added: 16083
2011-08-17 17:56 mot Note Added: 16084
2011-08-18 11:29 user15286 Note Added: 16088
2011-08-23 07:36 adamzammit Note Added: 16114
2011-08-26 13:18 user15286 Note Added: 16158
2011-08-26 15:45 user15286 Note Added: 16164
2011-08-29 06:43 adamzammit Note Added: 16175
2011-08-29 06:43 adamzammit Status assigned => closed
2011-08-29 06:43 adamzammit Resolution open => fixed
2011-08-29 06:43 adamzammit Fixed in Version => 1.91+