Hello, I’m a web craftsman with a passion for the modern web. I build web applications and play with social services and communities.

February 19, 2010 at 11:16 pm

If you develop some kind of multi-language software you will probably make use of something like setlocale in PHP. Now to get your l10n/i18n solution to work on a Debian server you have to install the required locale.

locale -a will show you which locale are installed on your system.

This will output something like this:


To add another locale now, edit /etc/locale.gen and uncomment the locale you need.

I.e. de_DE.utf8 for a German Locale uncomment.

After that run locale-gen as root to activate the new locale system-wide.

Don’t forget to restart your webserver daemon after the change if you want your web application to make use of the freshly activated locale.

June 19, 2009 at 6:23 pm

Recently I created a Flash-based file uploader for a website that was behind a HTTP Basic Auth.

Javascript calls flash for the file upload handling but Flash doesn’t know any browser cookies or any basic auth information. So the flash script always fails to upload the files since it can’t log into the basic auth area.

So I was looking for a workaround for this problem and came across a simple solution. You have to exclude the server-side script (async-upload.php in this example) that receives the uploads from Flash from the Basic Auth. To do so you can add the following lines to the .htaccess file in the same directory as the server-side script.

# Exclude the file upload script from authentication
<FilesMatch "(async-upload\.php)$">
Satisfy Any
Order allow,deny
Allow from all
Deny from none

Hope this will help someone.

November 24, 2007 at 1:59 am

Leopard Wiki Howto Banner

Welcome, due to a request in one of my other Leopard Server posts I will guide you through the setting up of the new Leopard Wiki and iCal Server.
While writing this the current server version is 10.5.1. However, I don’t think the way the basic setup works will change in the future.

Step 1: Log into Server Admin, connect to your server and go to Settings->Services and tick iCal, Open Directory and Web. (Of cause you can have more but those three are the ones you need to run the wiki server)
Leopard Wiki Howto 1 (services)

Step 2: Get you Open Directory to work! This is pretty straight forward and don’t need any special settings unless you want to do more with your server. In my case I just created an Open Directory Master on my FQDN which actually allows to run most of the LDAP related services.

Leopard Wiki Howto 2 (Open Directory)

Step 3: Go into iCal. The settings should be right by default. Important: In case you want to change the Data Store make sure your new destination folder has the right rights! (Check step 5 to take care of that)Start the iCal Service now! (Only if you use the default Data Store. Otherwise finish step 5 before!)

Step 4: Go to “Web”. Here we have to do a little bit more. Go to Settings->Web Services and make sure everything is like you want. In case you want to change the Data Store make sure your new destination folder has the right rights! (Check step 5 to take care of that)

Leopard Wiki Howto 4a (Web)

Then go to “Sites”. Add a new web site (+) or modify the default one. Type your FQDN into “Domain name”. I use “example.com” here. Take care whether you add “www.” in front or not. The Wiki will only be accessible over that exact domain name! (You can modify that later so). In case you want to change the Data Store make sure your new destination folder has the right rights! (Check step 5 to take care of that)

Leopard Wiki Howto 4b (Web)

Inside the web site settings go to “Web Services” and tick “Wiki and blog” and “Web calendar”:

Leopard Wiki Howto 4c (Web)

Save the setting and start “Web”. (Only if you use the default Data Store. Otherwise finish step 5 before!)

Step 5: This step is only needed if you decided to store your iCal, Wiki and/or Web Server files in another location than the default Data Store. This is useful if you have more than one disk to have all the important data separated from the standard OS X data. (In case of 10.5 Server that is very useful because you can reinstall OS X several times without backing up and recovering all the files every single time. I reinstalled 3 times before everything did what it was supposed to do.)

The problem about storing the files in another location is the access permission of the folders. iCal, Wiki and Web server have own users so you have to make sure that these users can access the folders you defined for the services. One way to do so is giving your folders a 777 CHMOD. I don’t recommend that because of security issues. Rather change the owner and group of the folders to the right ones:

  • User & group for Wiki: _teamsserver (read & write for owner/group, none for others)
  • User & group for iCal: _calendar (read & write for owner, read for group, none for others)
  • For the web server folder make sure that “others” can read.

Leopard Wiki Howto 5 (Rights)

Step 6: All right. So far so good. All the needed services are configured and running. Now open “Workgroup Manger” and go into your LDAP Directory (where you should be by default).If you can see the Directory Administrator you defined while setting up the Open Directory you are right.
Now go into the group view and add a new group. I call my group “Publications”. Choose the before created web site from the drop down “Enable to following services for this group on” and tick “wiki and blog” and “Web calendar”. Specify the rights as needed beneath and save the group.

Leopard Wiki Howto 6 (Group)

Create a new user who is part of your new group. (Tick “administer this server” for the user if you want the user to be able to administer the wiki.)

Congratulations, now you are set to use your Wiki!

Navigate your browser to “http://your-FQDN.com/groups/groupname/” and log in with the user you just created.
(http://example.com/groups/publications/ in my case from this tutorial)

Make sure you use exactly the same domain name as defined before.
www.example.com would NOT work in my case because I specified it as example.com without www.!

I hope this helped you. Feel free to post comments about your success or failure.

Good luck!

by Matthias Schmidt (m-schmidt.eu)