Here's the scenario: you are developing a web application using PHP on an Ubuntu server. You need to pull in data from an external database as part of the app. Unfortunately, the external database is Microsoft SQL Server. Accessing a PostgreSQL or MySQL database via PHP is very easy, but as I discovered, accessing MS SQL Server is less straightforward.
Add New CommentRead More
When you have first installed PHP, you may find that json_decode doesn't work. What will happen is you will be given no output at all. Carry on reading if you would like to know how to fix it. To determine the symptoms:
  1. Enable error messages to be shown by writing ini_set('display_errors', '1'); in your PHP code.
  2. Most likely, you will be given this error message now: Php Fatal Error Call To Undefined Function Json_decode
The solution:
Add New CommentRead More
This is the first of two articles about configuring Zarafa to enable some extra options that aren't covered in a default install. I've talked a little about Zarafa in a previous article. It's a Linux groupware system that's almost entirely open source. There's some very good documentation, including installation instructions, on the official Zarafa website. However, while this documentation covers Zarafa in great detail, it doesn't cover many common Linux server programs you might want to combine with it.
Add New CommentRead More

Zarafa is an email groupware system that aims to provide the capabilities of Microsoft Exchange on Linux servers. It's almost entirely open source, the only exception being an Outlook compatibility layer for business users who are used to Outlook and don't want to switch away.

Add New CommentRead More
This one's short and sweet: while working on a PHP application I needed to format some numbers as text so that, for example, '1' became '1st', '13' became '13th', '22' became '22nd' and so on. There isn't a built-in PHP function to do this (as far as I know) and none of the code snippets I came across online were very neat, so I ended up writing my own function. Since it's something that I imagine gets used a lot, I thought I'd put it up here.
Add New CommentRead More

As the lack of recent updates might suggest, things have been quite busy work-wise recently! Since I've been working a lot, and since it's Christmas, I thought I'd write something a bit different for this article. While I haven't had much free time lately, I've spent a bit of it playing a game by the name of Trine. It's promoted as a physics based platform/puzzle game, so there is a vague science angle to tie in with the rest of the site!

Add New CommentRead More

Like many people, I rely heavily on ssh to maintain and configure computers remotely. However, doing so usually requires making an outbound ssh connection from the computer you're working on, which isn't always convenient. For example, if you're using someone else's computer, the chances are they're using Windows and don't have an ssh client program installed.

Add New CommentRead More

If you're a science postgrad student, the chances are you've heard of LaTeX. It's very commonly used to write scientific papers, largely because it's very good for typesetting equations. A lot of science postgrads also write their theses using LaTeX, but very few of them seem to be given any training in how to use it. I know I didn't get any while writing mine!

Add New CommentRead More

Pages

Subscribe to Aleph Null RSS