Category Archives: Uncategorized

How to request support?

In Web Services we get a lot of support requests,  these range from bug reports, feature requests and job requests to our fans hounding us for signed autographs.  Your first point of contact with us is by emailing the IT Service Desk from Outlook or by calling #7444.  This is your time to shine!  Without clear succinct communication it makes it difficult to deliver efficient support and allocate resources.

  • Report one issue at a time.  This allows the issues to be prioritised individually and multiple team members can work on them at once.  It also gives the best clarity in tracking the issue.
  • Writing a clear email subject.  This is crucial.
    Good: Image on homepage is broken
    Bad: broken
    Good: Multiple login failures on GO leads to white screen
    Bad: login not working
  • Begin with summary.  Open with a quick summary of the problem.
  • Include web links.  This one thing is almost the most important, and and crucial component for us, yet is often left out leaving us to guess or have to wait chasing replies.  We’re a team dealing with thousands of web pages, we don’t always know what you’re talking about.
  • Include screenshots.  A picture paints a thousand words, try and include a full screenshots.   You can do this by pressing the “Print Sc(reen)” button next to “Scroll Lock” and then pasting (right click-> paste, or CTRL+V) into the email.
  • Full steps to reproduce the problem.  If we can’t reproduce the problem you are having, it’s very hard for us to fix it.  Help us to help you.

If you work with a member of our team often, you might think it’d be better to email them directly with your request.  Don’t.  It interrupts our work in progress making it take many times longer, which prevents us from finishing it and helping you.  It also circumvents our tracking systems, so we can’t see if your issue is important and needs fixing quickly.  Having issues come in to a central place allows us to see trends and spot failures faster.  What if someone is too busy or off ill with no out of office on?  Well your issue might well remain unresolved for a very long time.

Keeping all support requests coming through the IT Service Desk allows us to work as a team, see big problems occurring and find the right information at the right time.

All this helps us to work more efficiently 🙂

Thank you for reading this far!!!

 

Steve

Percona Live London 2013

Over the recent months I’ve been pushing myself to be more of a software engineer than a “coder”. To that end I’ve been investing my time heavily in a lot of things, and part of that is attending talks and conferences on interesting topics. So when I saw the tweet below, I jumped at the chance!

https://twitter.com/webandphp/status/385324546254835713

I earnestly entered and chance would have it, I won two tickets to Percona Live. The boss, Mike Nolan, graciously decided free was a good amount to spend on professional development. It probably didn’t hurt that I offered him the second ticket.

We unfortunately didn’t get to attend the well regarded Percona Live tutorials, something I was reminded of talking to other attendees when they mentioned quite how good they were. We did however try to attend different sessions on the conference schedule.

The keynotes were both informative and amusing, Mike hadn’t previously been aware of the animosity between Monty and Oracle, by the end of the keynotes he was. Nothing serious, just veiled digs!

Here’s the breakdown of my day:

Whilst I took notes in most of the talks covering tips, tricks, tweaks.. my biggest take home was from Luis Motta Campos‘ talk about MySQL, the ebay Classifieds Way. It was really interesting to see things we do (and have planned to do) at Edge Hill University, done on such a scale in a truly professional way. It both reinforced my plans for our own infrastructure and heavily added to my wishlist and roadmap!

Hopefully I’ll get some more time next week to do a more detailed break down of the individual talks. Or perhaps cover PHPNW 2013 or the Inviqa TDD Immersion day I did over the past couple of months!

Steve Daniels

Computer Availability App is here!

If you want to see where free computers are around campus then you’re in luck. The Edge Hill computer availability web app is up and running in some key locations around campus (@ehu.ac.uk/computers). And here it is!

Each area’s unfoldable map shows which computers are free (green is free!). We chose a salmon colour for used computers, because salmon are busy fish what with all the swimming and laying eggs. Or maybe it has something to do with being distinguishable from green for colourblind people.

Like salmon, people move around really quickly so you might find the computer you were hoping for has gone by the time you get there, and another one has appeared. So you can use the app to get a general idea of which computer area would be good to aim for. That’s why we used the signal strength indicator – so you can see at a glance your likelihood of finding a computer in that area.

That means likely.

There’s also a link to the room booking system, so feel free to come here just to book a room.

As well as showing computer usage, it also just shows where there are computers, which can be useful to new students who haven’t fully explored yet.

There’s a shiny new building overview page, that unsurprisingly gives an overview of the computers used in buildings. You might see this around screens on the campus.

There’s also a series of single map pages, just focusing on one computer area:

These single maps will be part of a slideshow shown around campus. We have one for the library which will rotate through the single maps and overview screens, so people can see at a glance where computers are being used. It should hopefully save some time in students’ days so they can so they can find a place to study more easily.

Responsive

The app is responsive – a liquid version that fills to fit the container device window – so use it on your phones and tablets as well.

 Desktop Version

And that’s it. The plan is to expand to show more computers around the campus. So go ahead and use it, and let us know what you think. Feedback is what sculpts the greatest software. So what would you change to make it better? Does it help you? Let us know.

webteam@edgehill.ac.uk

 

 

 

 

 

 

Creole on PHP 5.2.4 with MSSQL

Working in a University or any organization generally leaves you supporting a lot of old code, on even older systems. As part of our web services infrastructure virtualisation project I’ve been bringing a lot of old code on to new systems. As can be seen when I got PHP 5.2.4 running on Ubuntu 12.04 LTS Precise.

As it turns out, our code wasn’t running so smoothly on PHP 5.2.4 as Arthur Koziel points out there is a problem with Creole and PHP 5.2.4. While we didn’t have the exact same problem, his post highlighted where it could be fixed.

Our problem was that we have a third party product using a Microsoft SQL database. It either always had, or just started to spit out date time values in the following format: Nov 14 2012 07:30:00:000PM note the non standard specification of microseconds. (Not sure which way around the problem occurred because we upgraded a month or so ago, but only just got a report of the problem.)

PHP’s strtotime really doesn’t like that format, and I can see why, horrible MSSQL!

I saw that I could fix this in creole/drivers/mssql/MSSQLResultSet.php by providing an alternate getTimestamp function and using a bit of strptime and sprintf magic. Below is the code I used to fix it. This might not be the most elegant solution, but it works!


/**
* @see ResultSet::getTimestamp()
*/
public function getTimestamp($column, $format = 'Y-m-d H:i:s')
{
$idx = (is_int($column) ? $column - 1 : $column);
if (!array_key_exists($idx, $this->fields)) { throw new SQLException("Invalid resultset column: " . $column); }
if ($this->fields[$idx] === null) { return null; }

$ts = strtotime($this->fields[$idx]);
if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
// in PHP 5.2.4 this no longer works, MSSQL provides date time as
// Nov 14 2012 07:30:00:000PM
$tsUgly = strptime($this->fields[$idx], '%b %d %Y %I:%M:%S:000%p');
$tsNicer = sprintf('%04d-%02d-%02d %02d:%02d:%02d',
$tsUgly['tm_year'] + 1900, // This will be years since 1900, so we need to add 1900.
$tsUgly['tm_mon'] + 1, // This will be the month 0-11, so we add one.
$tsUgly['tm_mday'],
$tsUgly['tm_hour'],
$tsUgly['tm_min'],
$tsUgly['tm_sec']);
$ts = strtotime($tsNicer);
if ($ts === -1 || $ts === false) { // in PHP 5.1 return value changes to FALSE
throw new SQLException("Unable to convert value at column " . $column . " to timestamp: " . $this->fields[$idx]);
}
}
if ($format === null) {
return $ts;
}
if (strpos($format, '%') !== false) {
return strftime($format, $ts);
} else {
return date($format, $ts);
}
}

I hope that helps anyone else out there maintaining old code on newer systems. If anything it’ll help me if I come across a similar problem again!

Steve Daniels

PHP 5.2.x with APC on Ubuntu 10.04 LTS Lucid (via Hardy)

As part of a move to virtualise our last remaining physical servers and build more scaling capability and resilience into our web serving infrastructure we have a specific need to run a couple of legacy apps on PHP 5.2.x. In the future when we’ve managed to fit in testing a bug fixes we’ll have these apps running on PHP 5.3, or even 5.4, but for now this need exists.

We have templates for Ubuntu 10.04 LTS, and since this is the middle ground between when PHP 5.2 was last shipped with Ubuntu in 8.04 LTS, and the latest and greatest 12.04 LTS I figured it’d be more secure, efficient and easier to implement it there!

Thankfully most of the work has been done for me.. Randy Fay shows how to run Karmic’s PHP 5.2 on Lucid but Sergius14 suggested pinning PHP 5.2 to the Hardy versions and I tend to agree with the reason. I want the latest security patches bundled in!

So taking Randy’s /etc/apt/sources.list.d/karmic.list and /etc/apt/preferences.d/php file and changing karmic to hardy in the file name and file contents gets us up and running. See the attached files to see what we’re running, if you use these files remove the .txt suffix from the file name.

Because we’re now looking at double the amount of packages, apt is going to complain, we need to increase it’s cache. If you don’t you’ll get an error when you run sudo apt-get update so, following the fine instructions on how to increase your apt cache limit we’ll do this as a one liner:

echo 'APT::Cache-Limit "100000000";' | sudo tee -a /etc/apt/apt.conf.d/70debconf

Next let’s update and install libapache2-mod-php5 to pull in PHP5, Apache2 and the basics.

sudo apt-get update
sudo apt-get install libapache2-mod-php5

Check it’s working by visiting the ip of the server in a web browser.

http://youripaddress/

To check PHP’s working we’ll create a new file calling the phpinfo() function.

echo -e '' | sudo tee /var/www/phpinfo.php

Check http://youripaddress/phpinfo.php to ensure PHP is installed and correctly running. If your browser tries to download a file, you might need to restart Apache to enable PHP.

sudo /etc/init.d/apache2 restart

Now we need APC (There’s a good article on Wikipedia about PHP accelerators, of which APC is one). The php-apc package installable from APT has some unmet dependencies because we’re using Hardy’s packages. We can circumvent that by installing it via PECL instead.

This route isn’t without a few complications because we’re using Hardy’s PHP5.2 some files aren’t in the right places, or automatically included with dependencies.

I added to Randy’s /etc/apt/preferences.d/php the following to get the PHP5 dev files for PECL to run.

Package: php5-dev
Pin: release a=hardy
Pin-Priority: 991

Now we’ll get php5-cli, php5-dev and php-pear (which includes PECL), we’ll update the PECL channel whilst we’re there and then try to install APC with PECL.

sudo apt-get install php5-cli php5-dev php-pear
sudo pecl channel-update pecl.php.net
sudo pecl install apc

AGH!

Errors! As I said before, some files like libtool.m4 and ltmain.sh are in the wrong places and need to be symlinked.

sudo ln -s /usr/share/aclocal/libtool.m4 /usr/share/libtool/libtool.m4
sudo ln -s /usr/share/libtool/config/ltmain.sh /usr/share/libtool/ltmain.sh

libtool.m4 is also missing a few bits since libtool.m4 has been broken down into multiple files so we need to concatenate them back together and append to libtool.m4:

cat /usr/share/aclocal/lt~obsolete.m4 /usr/share/aclocal/ltoptions.m4 /usr/share/aclocal/ltsugar.m4 /usr/share/aclocal/ltversion.m4 | sudo tee -a /usr/share/aclocal/libtool.m4

We also have a missing pcre.h header file. To get that we need libpcre3-dev.

sudo apt-get install libpcre3-dev

This should be it, so lets use PECL to download, compile and install APC (accept all the defaults), enable it in the php.ini and restart Apache.

sudo pecl install apc
echo -e '\n\nextension=apc.so' | sudo tee -a /etc/php5/apache2/php.ini
sudo /etc/init.d/apache2 restart

Now it’s time go back and check http://youripaddress/phpinfo.php to see if APC is enabled!

Congratulations if you’ve read this far and if it helped!

Steve Daniels

Get your kit on

I’ve been looking at Typekit as a web font solution for headings, quotes, and promotional text – as an experiment I’ve mocked up this Blog post using Typekit; so you can get a feel for what it’s about.


So why would we need to use it?

I’ve harped on about web font limitations before; so I’ll just say that the fonts we could use were tragic and boring. I’ve also mentioned that we used sIFR as a fix for about six months, which was too quirky and jerky.

Hypothetically we could host fonts on our server and reference them using @font-face. This way all the fonts used in the printed prospectus, could be used on the website; but there’s the complex issue of copyright to contend with.

Speak the Web

We attended Speak the Web at Leaf café in Liverpool. I was impressed by Jake Smith’s presentation Putting the Font in Front End, especially his demo of Typekit.

Typekit offers a library of fonts: you pay a subscription; you choose which fonts suit you, and they deal with the legal stuff. I was impressed by the clarity of the sign-up process, and how easy it was to set up. The font libraries are impressive; all the big type foundries are represented.

The demo I put together uses the modest library of free fonts, supplied with the Typekit trial package. They are fine as a starting point, but they generally represent the less formal side of typography.

The Downside

The only problem I have is the way different browsers render fonts:  Some render crisply in one browser; but appear pixelated or weakly defined in another. They also lose clarity at smaller sizes. Unfortunately these problems are with the fonts themselves, so even if we hosted them we’d still have the same problem.

Consequently if we get a style guide that says Garamond should be used for headings, and I refer to Typekit, check the browser samples and find that it is unreadable in Firefox, we simply can’t use it. Straight away we would be looking at alternative fonts; when we didn’t want to fudge or compromise.

To Conclude

Weighing things up – I would use Typekit because it is easy to use and well designed, and any worries about copyright could be put aside.

Infrastructure dreams

16

I’ll admit it, I like to dream too.. though I’m sure it’s not much of a secret, the content of my dreams will surprise some!

I dream about ideal web serving infrastructures.

There, I said it, and this is my dream:

What I’m hoping to get set up in the new year is all sorts of cool stuff that I’ve been trying to find excuses to implement!

I’d first like Internet users to come in and hit our main Zeus Load Balancer this gives us the flexibility of being able to route the web requests anywhere we like instead of moving IP’s and changing DNS.
Then could hit Varnish Cache and have all the static bits and pieces cached in there which should take load off of poor old Apache (maybe we’ll try out nginx..).
From there I’ll be caching frequently built HTML fragments and database calls in memcached.
I’d like to try and factor in MySQL Proxy at some point to take the load off of out MySQL server and get it spread out to some slaves, which should make backing up much quicker too.

What’s your infrastructure like?

Can people see and problems and suggest alternatives?

Ste Daniels

P.S. I totally published this on the 16th at 8am and not on the 17th at 4:30pm! (Maybe the snow delayed the delivery?)

No more kissing under the mistletoe!!

I have heard this warning before in the last few years from conservationists but it appears now to be a more serious issue; the future supply of traditional English mistletoe is under threat. Why I hear you say; mistletoe thrives in established apple orchards and if you follow conservation then you will know that our apple orchards have been in serious decline for the past 60 years, this has great impact on our traditional mistletoe.

Mistletoe is a parasitic plant that grows attached to and within the branches of a tree or shrub, mainly apple trees but it will also grow within birch, hawthorn, lime and poplar. If left the mistletoe will eventually kill its host so it has to be managed, regular cutting will protect the host tree as well as ensuring a crop of mistletoe each Christmas time. Most mistletoe seeds are spread by birds; they eat the seeds and then spread them throughout the tree branches in their droppings. Mistletoe was often considered a pest that killed trees and devalued natural habitats, but was recently acknowledged as an ecological keystone species, an organism that has an excessively persistent influence over its community. A broad array of animals depend on mistletoe for food, consuming the leaves and young shoots, transferring pollen between plants, and dispersing the sticky seeds.

All is not lost however, The National Trust want you to help by buying home-grown mistletoe in the run-up to Christmas, which means asking where the mistletoe is sourced from when you buy it. Allot of our traditions we have lost over the years and it would be a crying shame if mistletoe disappeared as well.

There is so much more to mistletoe than its “romantic role”, buying mistletoe helps traditional British cider apple orchards thrive by removing mistletoe from the trees, so you are doing 2 things, helping a tradition to continue which in turn helps apple trees to flourish and let’s not forget it keeps us kissing!!

The Computer’s First Christmas Card

number 11
It’s a Friday afternoon, I’m as busy as a bee, and I need to write my advent blog post in five minutes. I need a theme: think Christmas, think technology…….think poetry???


Proustian memory time

It’s the 1970s when school boys wore Clarks sandals and had dirty faces; we sit crossed legged on a shiny cork floor, and our teacher reads us a poem.

Picture an avuncular man in a kipper tie, imparting verse in the style of a Dalek!

You need to know that the final line is delivered with a self-satisfied robotic squawk; which brings about an outbreak of childish laughter.

The Computer’s First Christmas Card

By Edwin Morgan (1968)

jollymerry
hollyberry
jollyberry
merryholly
happyholly
jollyjelly
jellybelly
bellymerry
hollyheppy
jollyMerry
marryJerry
merryHarry
hoppyBarry
heppyJarry
bobbyheppy
berryjorry
jorryjolly
moppyjelly
Mullymerry
Jerryjolly
bellyboppy
jorryhoppy
hollymoppy
Barrymerry
Jarryhappy
happyboppy
boppyjolly
jollymerry
merrymerry
merrymerry
merryChris
ammerryasa
Chrismerry
asMERRYCHR
YSANTHEMUM

Dashboards

Colorful house number, two
In my previous post I talked about Wallboards. As an aside, I’ve just started experimenting with using some old O2 Joggler’s as miniature information radiators in my new home. But that’s another blog post for another blog! This time round I’m covering dashboards!

Dashboards are beautiful things that seem to be getting slung haphazardly into all sorts of applications these days.. “view this on your dashboard” “view that on your dashboard” “configure it from your dashboard”.. blah blah blah. Dashboards can be a Good Thing™.

Here at Edge Hill University we run the our GO portal, we’ve written about GO many times so I won’t go into detail here, suffice to say it’s a portal that gives you tabs – your Home tab is effectively your “dashboard”. On my GO Home tab I’ve got some useful information shown to me – it stops me hunting around various places, all of it is Edge Hill specific.

GO home tab

On there I’ve got mail, Edge Hill rss feeds, staff directory, GO news, the forum – all bits of information I regularly check. The dashboard pulls it all together so I can access it at a glance. Saving me a lot of time.

I do the same with JIRA and Fisheye as you can see below:

JIRA dashboard

All my development information needs at my fingertips…

Do you pool information you want on dashboards of some sort of other? I know I’m missing the all important personal non worky dashboard for Facebook, Picassa, Flickr and other news feeds.. but I’m at work – I get distracted easily enough as it is without all that!

How many dashboards do you have? What’s on them?

Next up is home tabs..

Ste Daniels