One simple thing I keep having to do over and over again is to display the name of the month for a given date. Normally I have opted to use the first solution that comes to mind which is creating an array with all the month names in it and then when I want to retrieve the month name I just use
$monthName = $aMonth[$monthNum];
However, when I wanted to use PHP to display the month name this time I wanted to see if there was a better solution.
The one I came across was posted on The Code Cookbook and was a simple 1 line statement which was great… simpler, neater and far more elegant than my usual method and it looked like
$monthName = date("F", mktime(0, 0, 0, $monthNum, 10));
Normally I would have been happy with this, however was needing to deal with a month drop down box which didn’t run from January to December but instead ran from November to April but this worked out to be rather simple too.
After about a year since the inital meeting regarding creating a website for the Dunscore Community Council, I can proudly announce that the website has now been successfully launched.
The project was initially to create a website focused around the Community Council but during the last year it has expanded it’s scope to encompass the Village of Dunscore as a whole and provide a central point for information not only regarding council business, but local business, events and activities as well.
The website has been very well received by all involved within the project and I look forward to a bright and successful future.
A few weeks ago the company I work for was changing the server that several client sites are hosted on and this included a website built up using the eCommerce package magento. All of the migrations went ahead without any problems with the exception of this magento site and it had a couple of us stumped for quite a while.
We followed the basic plan for the migration:-
- Copy magento files up to the new server
- Backup the database on the old server and restore on the new server and set the MySQL user
- Update the “web/unsecure/base_url” and “web/secure/base_url” keys within the core_config_data
This seems to work well for almost everyone we found asking for migration help on the forums but did not work for us. We even tried updating the /downloader/pear/pear.ini to ensure any additional modules downloaded via Magento Connect would install properly (I have since found out you can simply delete the pear.ini and Magento Connect will rebuild it with the correct paths!)
A few weeks ago I posted a blog entry about problems with Zend clearIdentity() with IE7 and Chrome but I’ve since found that the Zend Framework was not at the root of the problem. After discussing the problem with a colleague we found that there was a line in the bootstrap.php file like:-
A few months back both my Windows Vista (Business) computers would not longer print even though they had been printing fine for months. I tried
- restarting the workstations
- restarting the server,
- restarting the print spooler service on the workstations
- restarting the printer spooler server on the server
- deleting printers and tryed to re-add them
Regardless what I tried neither of the Windows Vista computers would allow me to printer and always presented me with the following error when trying to add a printer and almost always when the computer booted:-
The local print spooler service is not running. Please restart the spooler or restart the machine.
At that point I didn’t need to print much so I didn’t try too hard to fix it and simply resorted to printing from my only Windows XP machine I had.
Today I finally had enough and decided it was time to find a solution to this local print spooler service is not running problem.
Today I have found a new nemesis in the form of the Zend Framework! I have been working on a client website that for some reason just will not allow them to log out properly when they’re using IE7 or Google Chrome but it works fine in Firefox (please don’t post the “get a better browser” comments as it’s really not very helpful).
I’ve check the online examples and my logout function is identical, line for line, as the examples.
public function logoutAction()
// clear everything - session is cleared also!
For some reason in IE7 and Chrome it only seems to execute the logoutAction() function if i do a hard refresh (Ctrl + F5) otherwise it redirect to the login form but the login details do not seem to get erased and I can still access the administration pages as if I am still logged in.
It’s driven me crazy all afternoon and I eventually had to give up for the day and hope that it’ll all become clear tomorrow when my mind is fresh and my coffee is strong!
For several months now I’ve been using eSense Visualizers for Microsoft Sharepoint to output the contents of a database in a meaningful and easy to understand view that is suitable for the client, although lately I’ve not been using it as much. Just this morning I’ve had to use it for a few hours again and I’m quickly remembering why I don’t like it and I have several issues that bug me (and I’m hoping it’s not just me). These include:-
Having just set up WordPress on here this morning one additional thing I wanted to do which was to put a redirect in place to redirect my sub domain on wordpress.org (which is http://chrisshennan.wordpress.com) to point to my own domain name.
My main reason for doing this was that when I comment on some of my friends blogs (mainly those on blogspot) I have posted the comment using my WordPress profile which only allows me to enter my wordpress username which then links to username.wordpress.com. As a result I would have to be adding my new blogs entries to 2 blogs which would be a waste of time and bad in terms or SEO (duplicated content resulting in a lower search engine listings).
I have decided to give blogging another try and as I know that I won’t be able to refrain from talking shop I have made the consious decision not to even try and stop myself from talking shop but I hope to bring in some non-shop talk as well.
So with this attempt I have just created this blog, installed my top 5 essential wordpress plugins and have now just said “hello world” once again! but so far the world has not said hello back :(
I hope you will find something interesting in my blog (once I actually write something) and of course all comments as welcome.