Per previous discussion, Information Systems Management students at Chelsea School have completed a LimeSurvey patch for the TurnKey Linux LAMP (Hardy) appliance. The patch uses limesurvey187plus-build8518-20100323 and installs Hardy with LAMP and LimeSurvey to a pre-configured state.

Curtis Fawcett, Adrian Madison, Jerel Moses, Steven Robinson, Maurice Quarles, and David Walton configured the VMware appliance while I recorded the build notes.

Curtis Fawcett, Jerel Moses, Maurice Quarles, and David Walton created the patch with my support.

It looks at though the patch is greater than the 8 MB threshold a forum post attachment allows for. I've posted the patch to our website: to download directly, follow . It's been pointed out by a user that this version has a bug.

The bug has been resolved. The LimeSurvey TKLPatch can be downloaded directly from here ( or by navigating the project website at Update:Rename the compressed tarball to reflect the name of the patch it contains.

mv limesurvey-b.tar.gz limesurvey.tar.gz

Account Information

Ubuntu Root Account

Username: root

Password: blank (or root)

MySQL Root Account

Username: Root

Password: root (until installation)

LimeSurvey MySQL Account

Username: limesurvey

Password limesurvey

LimeSurvey Administrator Account

Username: admin

Password admin

As usual, your feedback, comments, suggestions, and critiques are encouraged. If any bugs are found, we will revise this post.

Liraz Siri's picture

I applied the patch to TurnKey LAMP, and successfully installed the appliance to a VM.

I wasn't previously familiar with LimeSurvey, but didn't find it too difficult to create a test survey to confirm everything was working. I accessed the admin interface at http://example.ip/admin, logged in with the default credentials and in a few minutes had my first survey up and running.

Kudos to the Chelsea School gang, everything seems to be working out of the box. This will make a great addition to our open source appliance library!

I've been warned via email that there may be a bug in the LimeSurvey TKLPatch.

When opening the Template Manager, the user got this error:

Warning: fopen(/var/www/tmp/template_

temp_100801200912.html) [function.fopen]: failed to open stream: Permission denied in /var/www/admin/templates.php on line 1029

I won't have the team that worked on it back for a few weeks, but I'm gonna try to sort out what I can.

I thought I saw a permissions problem, but that didn't solve it. So for now, my decision has to be to work it out myself or wait til I have the team back.

I've located the source of the bug (permissions) and will address it myself. Expect a revised TKLPatch this afternoon or tomorrow. VMs for VirtualBox and VMWare, along with a revised ISO, will be available at I'll make meticulous notes so students have something close to the experience of a bug report and resolution.

Revised TKLPatch for LimeSurvey can be found here or by navigating to it from The revision addressed a bug helpfully pointed out by a user in which the administrator was unable to access the template manager. Original post has been revised to reflect the change.


Rik Goldman

Liraz Siri's picture

To check the fix I re-downloaded the limesurvey patch. All 23MBs worth of it. Then I calculated the diff:

diff --git a/limesurvey/conf b/limesurvey/conf
index 96c689b..35eac65 100755
--- a/limesurvey/conf
+++ b/limesurvey/conf
@@ -11,6 +11,10 @@ sed -i "s| \(.*\)| $HOSTNAME|" /etc/hostname
 apt-get update

+chown -R www-data /var/www/tmp
+chown -R www-data /var/www/templates
+chown -R www-data /var/www/upload
 #Change MySQL Server Root Account PW
 mysqladmin -u root password root

This should probably be:

chown -R www-data:www-data path

That sets the ownership to group www-data as well. Not that it makes a big difference but it's the correct thing to do. Otherwise those directories are owned by group root which is probably not what we want.

That's a lot of bits to download for such a small change. Makes the patch fatter than it needs to be. Perhaps in the future it would better to download the tarball from upstream (e.g., wget command in the conf) rather than stick it in the overlay.

Thanks for the substantive suggestions for improving the patch. I'm wrestling a little with using wget and then configuring, rather than taking a preconfigured app from the working vm. All your points are well taken. We just keep learning.



dmtelf's picture

To update the Limesurvey v1.87 ISO from to the latest version without getting out of memory errors in step 3 of the ComfortUpdate process, you need to replace updater.php as per my post here:

Hallsie's picture

Ok so I installed TKL LAMP then opened shell in a box and did the following:


that downloaded the patch for me.

Then did

sudo apt-get update
sudo apt-get install tklpatch

which I found here:

Then following that I did:

tklpatch-apply / limesurvey-b.tar.gz

which returns

root@lamp ~# tklpatch-apply / limesurvey-b.tar.gz
TKLPATCH_ISOLABEL:  limesurvey-b
#extracting patch limesurvey-b.tar.gz to /tmp/tmp.wqEYeffhKN
fatal:  no such directory: /tmp/tmp.wqEYejjhKN/limesurvey-b
root@lamp ~#

What am I doing wrong and/or what do I need to do?

This is the only line that looks suspect to me:

tklpatch-apply / limesurvey-b.tar.gz

Unless I'm missing somthing bashish, I'm more used to something like this:

tklpatch-apply limesurvey-b.tar.gz

Run, of course, from the directory containing the patch. May want to check the patch to make sure to permissions are in tact (e.g. conf is executeable).

Personally, I'm much more comfortable applying a patch to an ISO in a build environment.

tklpatch turnkey-lamp-11.1.iso limesurvey-b.tar.gz

...and then moving the newly patched ISO into place for deployment - as a new VM, in all likelyhood.

I'll review the patch in the coming days and see if I can find something to cause what you're seeing.

Best of luck,

Rik Goldman

Hallsie's picture

I got the syntax for the "tklpatch-apply / ..."  line from this site (i gave the url).

When I do that I get the "usage" text wall that starts with:

Apply the patch to the extracted root filesystem

    debs/              #custom debian packages (installed with dpkg -i *.deb)

There is more(like I said a wall) but because I'm using webshell I cannot copy/paste for some reason in firefox.

I think the "/" is the root directory in the syntax but I'm too much of a noob to know.

Is there a way to apply the patch to the ISO in windows?  this is the only linux box I have and it's a VM so I can't really burn it or install it on a VM as it's in the wrong box etc.

It's very possible I'm doing something wrong which is why I posted my exact instructions I was following/typed etc.

Thanks for the help so far.

Hallsie's picture

Ok so I didn't want to be "one of those guys" so I loaded up another LAMP box...  downloaded the iso on it:


Then grabbed the TKL Patch:


Then ran:

apt-get update
apt-get install tklpatch
tklpatch turnkey-lamp-11.1-lucid-x86.iso limesurvey-b.tar.gz

It failed for the same reason again:

fatal:  no such directory: /tmp/tmp.AMz0ai9mH6/limesurvey-b

I believe there is something wrong with the patch unless I should just back away from the keyboard and crawl under a rock.

I can see that the script created /tmp/tmp.AMz0ai9mH6/limesurvey/ so maybe it's pointing in the wrong direction or it's creating the wrong folder?

tklpatch-apply / /limsurveyb.tar.gz #(note where spaces are and are not)

should work if the patch is in the root directory (top most in the hierarchy). Otherwise, if it's in your home directory, for example:

tklpatch-apply / ~/limesurveyb.tar.gz #I know the filename is wrong

I think the docs mention that patching a running instance may not always result as one would anticipate.

I see your later post - I'm gonna have at the patch and see what results I get. I'll share.

Hallsie's picture

Ok so you know...  I'm running a TKL LAMP install with VMWARE Server 2.0.2 installed.

Then I made a 8GB (should be great for limesurvey) and First I tried installing TKL LAMP and then applying your patch (which you read about above) then after you suggested to patch the .iso instead I tried that and it failed.  This was after I figured out that changing the filename needed to be done for it to even try to work right.  When that failed I tried to go back and patch the working TKL LAMP and again that failed out as mentioned above.

Finally I said "screw it" and grabbed your newest .iso which SHOULD be everything I need... didn't work.  Also there is a severe lack of documentation about HOW to go about using these things of yours.  Possibly your understanding is different or something.  I'll walk through what I did and see if that helps...

It started ok.  It looked different than the normal TKL LAMP installer but everything was fine so far.  Now again I set the passwords as what I want them to be.  It prompted me for the System root account and the MySQL account passwords.  What was missing was the TKL option for TKLBAM.  It then looked like it was going or done as it sat there with a blue screen and a menu that had the options:

  1. Install to Disk
  2. Set root password
  3. MySQL Config
  4. Install GRUB
  5. Finished

With OK and Cancel at the bottom.

When I selected the options I was greeted with the portion of the initial setup I expected to see.  When I selected Finished (or whatever the last one said {I'm no longer at work to see}) the screen would flash and come back up like I never pressed any keys.

I finally selected Cancel (it's the only option that would kill that screen) and then i was kicked back to the terminal window of the box.

Is this what it was supposed to do?  I am very used to TKL installations and am familiar with the process of installing their packages and this is not the expected behavior.  I was expecting to first see the screen asking me if I want to install GRUB and then when done the IP address information screen is up.  I saw the GRUB install on that menu I mentioned but again not the expected behavior of the system.  What is it that I am doing wrong?  I assume that others would have said something about your patch if it didn't work so IDK what I am doing wrong.

I will document what it is saying with the ISO tomorrow when I get back to work.

I have confirmed same results you get. I suppose it could be that we're doing the same thing wrong. But I think rather that the problem is here: the patch was built for Hardy, the previous LTS version of Ubuntu that appliances had been based on until the release of Lucid. The 11.1 releases are built on Lucid and have several feature improvements (no default passwords, etc). It's my thinking that the 11.1 Lamp might call for a rebuilt patch. I'd put this in the queue, but I believe the devs are working on a TKL Limesurvey appliance for the second half of 11.1. I don't won't to compound the work.

Thanks for your feedback. I'm sorry the documentation is not serving your needs. I rely on the existing documentation for applying patches.

No, what you describe doesn't gibe with my experience with TKL releases. I'm tending to think it's the new TKL releases and their features.

In the meantime, I recommend trying out the prebuilt virtual machines for VB and VMware at the site ( Alternatively, an ISO with the original patched Hardy version should be available.

Let me know how else I can help.

Rik Goldman

Jeremy Davis's picture

But that's not why you are getting the error message you are. The error "file not found /tmp/blah/limesurvey" (or whatever it was exactly) suggests to me a misnamed patch. Try opening the patch in Windows (you'll need 7zip or similar) and check the name of the folder inside the archive. The patch archive name must be the same as the folder inside or it will fail in that way. Easiest thing to do is to rename the patch archive to the same name as the folder. (I know about this one because I stuggled lots with that issue too).

Although as Rik suggested it may also be an issue with an old patch being applied to a newer release as well.

FYI Rik, if you use tklpatch-bundle to package your patches, (and don't change the filename after) you won't get this issue.

Hallsie's picture


If you look above I already discovered the patch name vs. extracted folder name issue.  I got past that and ran into different issues which do appear to be version mismatches and how they were built with the older release of LAMP etc.


I would have loved to use your stuff but alas I have yet to get anything running.  I was going to use your patch for ampache but after the limesurvey debacle I looked and that is very VERY simple now that it is in the repositories followed by filling out a couple of forms that create the config file.  The hardest part actually was trying to figure out how I was going to upload the config file into the folder it was wanting me to because it didn't give you the full path to where to go.


I think that as far as documentation and what I generally am looking for is really just anything.  With simple documentation I would have found out that it was built with the Hardy release of LAMP and I would have tried to figure out if I can still download that.

There is a huge disconnect on this site with "Patches" in general.  There are all these patches but yet no real way to find them then as I have found out there is no way to know which version they are built for etc.

What I would suggest is a section for just this...  PATCHES.  Take a note or two from where they have a section that is devoted to extensions.  It is organized by category and then after that it shows "compatability" as well as a comments section with ratings etc.  All that compared to the current state of "Patches" which is nothing more than a tag or two on a forum that doesn't have categories itself.

Thanks for all the help and info and I can't wait to see what this site releases in the future.  I have grabbed so many appliances and given them a whirl to find something and it really is awesome!

Thanks for the substantive feedback, Hallsie.

I've edited to OP to note that this is intended to patch the Hardy release of the LAMP appliance. I've also noted the need to rename the compressed tarball.

It may be time to return to a discussion about a patch submission form that asks for specific details (such as appliance to patch), usage notes, credentials, and links to docs for the patch process. As it stands, I can think of three ways to submit a patch to the community, and all three ask different info of the submitter. The TKLPatch documentation does say to include certain information when sharing the patch. I'm going to double-check that doc to see if the appliance version to be patched is part of the information solicited.

Regarding the virtual appliances: if you have the time, please contact me via contact link and let me know the scoop. This is the first concern that's been expressed and I like to address them with the responsiveness I like to see in others.

Thanks Hallsie,

Rik Goldman

Hallsie's picture

I will give the VM's a shot HOPEFULLY later today; I do this in what little "research" and "spare time" I have :)

I only wish I knew more about the Linux environment to be HELPFUL.

Jeremy Davis's picture

[Sorry if this post seems a little out of sync with the conversation - I wrote it yesterday afternoon clicked the button and walked away. Just realised that it had only previewed, not posted. Was almost going to just leave it but thought I may as well post it!]

I realised I was a little late to the party but obviously missed the bit where you realised the renaming thing. That'll teach me for being smug and all knowing! :)

And yes documentation in general is definately an issue here. It's just one of those things that constantly falls by the wayside. I guess when there's so much to do and no one getting paid, people just do what they want to do to help, and more often than not, no one wants to do documentation! But you are right, some better docs would make a huge world of difference for anyone new here, especially for Linux newbs. Also it would make the project more accessable, which can only be a good thing. Even moreso, when part of the mission of TKL is to make the power and flexability of open source software accessable to mere mortals (which obviously isn't quite there yet...)

As for finding patches, probably the easiest way to go is to just use the forum tag "tklpatch" (on the left), that should pretty much bring them all up. Another way is there is a list of them on the TKL Dev Wiki. Where both of these methods fall over though, is they rely on the patch dev to list their patch on the Dev wiki and tag their post accordingly.

I for one agree with your sentiments around a TKLPatch subforum, and have spoken about how I would like to see the forum split up a little more but the core devs prefer to keep it as clean and simple as possible. In some respects they do have a bit of a point, also the tags are cool and in some respects (when posts are tagged appropriately) makes the idea of creating more subforums a little superfluous.

Hallsie's picture

Figured out that the file is named limesurvey-b.tar.gz but the folder it extracts is named limesurvey so I don't know if it is tklpatch or what that looks but I believe it looks into whatever the filename is when it extracts and then looks to run the contents. 

For example if I rename the file to "billy.tar.gz" then it looks for an extracted folder of "billy.tar.gz".

I changed the name of the file to limesurvey.tar.gz and the thing ran.  Now for the first test...  for doing what you said was the best option I ran it on the .iso for LAMP...   It failed...  would not run.  I believe that what happens is that your script for install attempts to run MySQL to create databases while it is patching and it errored out at that step. 

I then went back and decided to apply the patch to the live box....

A couple of things here.  First is that after changing the filename the patch began to run and went a long way but did not finish.  The end of the line where it errored out is:

+ mysqladmin -u root password root
mysqladmin:  connect to server at 'localhost' failed
error: 'Access denied for user 'root'@'localhost' (using password: NO)'

and then kicked it back to the "root@lamp ~#" prompt.

Furthermore I cannot even access the webpage for the machine...  When I access http://[ip] i get:

Can't connect to LimeSurvey database.  Reason:  Access denied for user 'limesurvey'@'localhost' (using password:  YES)


I think I am going to give up on this as it shouldn't be this difficult (one would think).  I didn't see anything in any documentation of yours that I had to set the user accounts up on the initial LAMP install or anything like that as I assumed that it was going to change my passwords to the ones you listed above or that it would prompt me to change them etc.


I'll just throw up a VM and use the .iso you 'pre-made' but you should look at these issues though.


I don't know if this posted yesterday...  maybe a repost.

I'll look into revising the patch for the 11.1 Lamp appliance.

It think patching 11.1 with the patch intended for Hardy should be precisely as difficult as you're finding it. In 11.1, the MySQL root password is set on installation. IIRC, that was not the case with the Hardy appliance. As a result, I believe the patch doesn't have the priv's it needs to import the db tables and...junk. Likewise, it cannot add the limesurvey MySQL user, grant it priv's, and set its password.

Between talking to the TKL devs and the Limesurvey devs, I'll weigh whether to revise the patch for the 11.1 Lucid appliances. Knowing that an official release is coming is a deterrant. Both of us value our time; I think the time may be better spent coming up with patch submission protocols and procedures so your experience is repeated ad infinitum for other members of the community and other patches.

Hallsie's picture

I was looking at their site and it doesn't look TOO difficult to install as is anyway.

I don't know how to create a patch but I can document my entire process and put it here for future people trying to install.

Jeremy Davis's picture

ANd I'm sure helpful for others.

FYI a TKLPatch is basically an install script, usually coupled with files to be overlayed on the host filesystem. The TKL devs haven't reinvented the wheel, just added some spokey dokes! :)

Actually TKLPatch is a lot more useful than spokey dokes and in my experience doesn't actually make any noise at all - regardless I like the analogy.

If you are insterested in learning I'm happy to help, otherwise even just posting the install instructions would help others I'm sure.

Add new comment