View Issue Details

This bug affects 1 person(s).
 0
IDProjectCategoryView StatusLast Update
05071Bug reportsImport/Exportpublic2011-03-31 21:54
Reportercsnook Assigned Toc_schmitz  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version1.90+ 
Fixed in Version2.00a1 
Summary05071: xmlwriter error should be reported at install time, be more informative, and use proper mime type
Description

When a user exports a survey on a system that doesn't have a working php XMLwriter class, Limesurvey delivers the error message with the mimetype appropriate for a correct Limesurvey export file, causing the browser to save the file rather than display the error message. This results in silent backup failure.

When a user attempts to copy a survey on a system that doesn't have libxml2 installed, they do see the error saying that their PHP build doesn't support XMLwriter, even if XMLwriter is in fact supported in their build, as is the default on almost all modern distributions. This leads troubleshooting down the wrong path.

When php is initialized at web server startup, php checks to see if xmlwriter can be initialized. If libxml2 is not installed, php removes the xmlwriter info from its configuration state. phpinfo() will actually lie and say that php was configured with --disable-xmlwriter, even if it was actually built with --enable-xmlwriter=shared.

Once the administrator has figured out that libxml2 is needed and installed it, the same error message will appear until the web server is restarted, leading the administrator to think that something is more fundamentally wrong with the xmlwriter class. Since php -i shows --enable-xmlwriter=shared, they may think that they've already done all that should be necessary to enable it. Server restarts are a big deal in many environments, and not done lightly, so the administrator may not be inclined to do it unless they know it's necessary.

Steps To Reproduce

1) Install a minimal CentOS system, plus php, httpd, and mysql-server
2) Install Limesurvey
3) Use Limesurvey for weeks without noticing a problem
4) Export a survey for backup, but don't check contents of the exported file
5) Heavily modify the survey, thinking you have a backup
6) Try and fail to import the export file
7) Try and fail to copy a survey
8) Install libxml2
9) Try and fail to copy a survey again

Additional Information

The installer should check for functioning xmlwriter support and warn at install time if it's absent, so this problem doesn't suddenly crop up long after Limesurvey is believed to be up and running, particularly given that it allows for silent user-level backup failure.

Returning the error message with the export file mimetype is a bug. When an error like that occurs, the user should be directed to an html error page with the appropriate mimetype to cause it to be displayed in the browser, rather than returned in what the user thinks is an XML file that they have no reason to browse.

The error message ambiguity is more PHP's fault for lying about config info, not Limesurvey's fault, but Limesurvey could save administrators a lot of headache with a more helpful error message. It's particularly annoying because it's possible to encounter this problem after Limesurvey has been up and running for a while and it's been deployed.

TagsNo tags attached.
Bug heat0
Complete LimeSurvey version number (& build)9642
I will donate to the project if issue is resolvedYes
BrowserFirefox 3.6.16
Database type & versionmysql-server-5.0.77-4.el5_5.4
Server OS (if known)CentOS 5.5
Webserver software & version (if known)httpd-2.2.3-43.el5.centos.3
PHP Versionphp-5.1.6-27.el5_5.3

Users monitoring this issue

There are no users monitoring this issue.

Activities

There are no notes attached to this issue.

Issue History

Date Modified Username Field Change
2011-03-31 21:34 csnook New Issue
2011-03-31 21:54 c_schmitz Status new => closed
2011-03-31 21:54 c_schmitz Assigned To => c_schmitz
2011-03-31 21:54 c_schmitz Resolution open => fixed
2011-03-31 21:54 c_schmitz Fixed in Version => 2.00a1