Check out the LimeSurvey source code on GitHub!

Limesurvey installation problems on Windows Server 2008 with IIS7 - resolved

6 years 3 weeks ago #56405 by pholcomb
I had a lot (I mean A LOT) of trouble getting Limesurvey setup on Windows Server 2008, but once setup it seems to run quite well. And overall, I am quite happy with it so far.

I am not sure why the installation section of this site says that IIS and Windows server is not ideal for Limesurvey (other than apparently no one in the support group is running Windows). And as a small gripe, I found them less than helpful in figuring out the installation issues. After interacting with this forum and getting little help, I decided to do some sleuthing of my own -- which ended up being several hours of trial and error debugging of the php code. Oh well, it is open source after all. The somewhat annoying advice I did get here in the forums was to get my sys admin to help because it was obviously a system config problem, which, as you will see below, is not the case (besides, I am my own sys admin -- one of the nice things about Windows Server, it is quite easy to administer in most cases).

Here is how I solved my installation problems.

All of the instructions listed at the site below for installing limesurvey on Win2008 seem to be correct. ( ). But if you have the problem I discuss below you will want to also go to #6 to see what else you need to do to get limesurvey up and running.

Here is a summary of how to get limesurvey 1.90 running on Windows Server 2008 --further details are in the links provided:

(1) IIS7 must be installed and running

(2) fastCGI for IIS must be installed (see ).

(3) php must be installed (see ). Note there may be configuration issues here. I set up fastCGI and php months ago when adding a wiki to our site and can't remember if there were additional things I needed to do beyond the standard setup.

(4) MySQL (apparently you can also use MsSQL -- I have not tried this) must be installed and a default limesurvey user/database created (see and ). When things didn't work initially I went to the MySQL folder and created a database by hand as described above in the setting-up-a-database. I'm not sure this is necessary because once limesurvey is running asks it seems to do this.

(5) limesurvey must be unzipped to into the wwwroot folder of IIS. It might also be the case that you will need to adjust the permissions on these folders. I added write access for the IIS_USR account during my debugging and have not gone back to check to see if that is necessary. My advice is to leave the permissions alone initially and see if limesurvey works. There are some edits you need to make to a few of the php files -- these are described in the links above.

(6) Here is the critical step: from a web browser go to http://yoursite/limesurvey/admin/install (this site should work from any computer on the web -- assuming your server is on the web of course) or alternatively http://localhost/limesurvey/admin/install (if you are running a browser from your server -- I had a problem with this latter approach because I had not bound "localhost" to my web site in IIS Administrator).
a. if your server is like mine you will get a 500 browser error at this point. If you don't get an error and limesurvey starts then you probably don't need the rest of the instructions below.
b. If you are here that means that you are likely having the same problem I had. Best I can tell the issue starts with the admin\install\index.php routine, which runs by default when you go to the above url. One of the things install\index.php does is that it makes a number of "require_once" calls to other php routines (require_once() is a subroutine in pdp that allows a php programmer to run another php routine from within a calling php routine -- i.e., nesting). One of the calls index.php makes is to "config-defaults.php" which is in the limesurvey folder (two folders about index.psp -- you might notice that this is one of the files you have to have edited in one of the above configuration steps). This routine sets up a lot of basic info that limesurvey needs. But one thing it does is it also issues a require_once call of its own to limesurvey\config.php. This is where the problem is. The nested call to config.php within config-defaults.php (which remember was already a nested call from install\index.php) does not run -- at least on my php setup (I suppose this could be a php configuration issue, but I couldn't figure out how/why). However, I found that by commenting out the require_once call to config.php in the config-defaults.php file (which by the way, there is a warning in the code not to do!! ignore that warning -- it is clearly wrong), fixes my problem! You can use a regular text editor to do the commenting out this line of code (I put a // in front of the require_once('config.php'); in config-defaults.php). I found that notepad is not ideal for doing this because it doesn't show Unix style line feeds correctly. Remember limesurvey was developed on/for Unix machines and almost all of the php code uses linefeeds only (rather than linefeed and CR which is more common on Windows machines) making it hard to follow the php code on a Windows machine. I used emeditor -- which can handle the Unix style linefeeds. Once you've made this change and saved the config-defaults.php file you should be all set and the initial configuration should now run fine. Simply use your web browser and go back to http://yoursite/limesurvey/admin/install and follow the instructions.

What is weird is why the config-defaults.php calls config.php to begin with. I didn't get too far into figuring out what the various setup routines do, but there does seem to be a lot of repetition in what these two do and I suspect that the inclusion of the config.php call is not necessary. I don't have a clue why it doesn't effect non-Windows setups.

Hope this helps and Good luck!

Please Log in to join the conversation.

6 years 3 weeks ago - 6 years 3 weeks ago #56414 by holch
Thanks for adding this.

By the way, the "annoying" advice to ask the sys admin for help came from me, because it sounded like a server configuration problem to me (which doesn't seem totally wrong - see first paragraph of point 6).

I can understand that it was annoying that no one could really help you, but as you said, most people don't use IIS for development, which makes it difficult for them to help you. Whenever it comes to software that is running PHP/MySQL I would recommend a LAMP environment anyway.

So now that you have that nice tutorial, could you include it into the documentation under the installation chapter? Because here in the forum it can get "lost", while in the documentation it should be easily accesible by everyone. The documentation is a WIKI, so you can simply use your login from the forum and update the information there. The project depends on the help of the community. As you saw, if there is no one around using the IIS, the IIS users will have difficulty to get support. So it would be cool to have someone who is knowledgeable with the Microsoft server and hangs around in the forum to help out when there is help required. We all do this in our spare time. For example, I am not a developer, but a user and I try to help out in the forum, whenever I can to give something back. It's the least I can do to give something back to a project that provides me with this awsome software with open sources (so I could always adapt it to my needs) and free of charge.

I'm not a LimeSurvey GmbH member. I answer at the LimeSurvey forum in my spare time. No support via private message.
Some helpful links: Manual (EN) | Question Types | Workarounds
Last Edit: 6 years 3 weeks ago by holch.

Please Log in to join the conversation.

6 years 2 weeks ago #56603 by Mazi
Great instructions!

As said before, please update our manual with this information, this will help others a lot.

Best regards/Beste Grüße,
Dr. Marcel Minke
(Limesurvey Head of Support)
Need Help? We offer professional Limesurvey support
Contact: marcel.minke(at)'"

Please Log in to join the conversation.

Imprint                   Privacy policy         General Terms & Conditions         Revocation information and revocation form