Posted by Christopher Shennan January 1st, 2010
I just wanted to wish everyone a Happy New Year and all the best for 2010. I hope that it proves to be a productive and successful year for you all.
I hope to get myself more motivated in 2010 and make 2010 a good year and work for me. In this aim I hope to post a good few new blog entries on here over the next year and I’ve got a few in the pipeline already including a wordpress plugin I’m developing and moving Manage My Alerts over to Symfony 1.3/1.4 and I hope the entries I post are of use to you.
Once again I would like to wish you a Happy New Year and all the best for 2010.
References
Manage My Alerts – An online reminder service
Tags: new year, plugin, Symfony, WordPress
Read full article
Posted by Christopher Shennan December 29th, 2009
This Christmas was the quietest Christmas I have had in years in terms of the obligatory “if you have got the time” IT jobs as I only had 1 request for fixing a computer this year (instead of the 4 computers and a DVD player I had a few years back… all requested within 2 hours of arriving home).
Luckily this one turned out to be relatively simple and only took 5 minutes to fix although when I first heard about it I thought it was going to take a few hours. My aunt and uncle reported a problem with logging into their laptop (running Windows Vista Home Premium) on my uncle’s profile where it would give an error message “The User Profile Service failed the logon”, after which it would simply return them to the profile selection screen.
Read the rest of this entry »
Tags: Computer Maintenance, support, Windows Vista
Read full article
Posted by Christopher Shennan December 8th, 2009
Over the weekend I launched our newest site, The Weekly Whinge, which was set up as a place for me to vent my frustration and generally just rant and complain about life. As it has only just been launched my whinge list is relatively small so far but I’m finding ideas all over the place, on the way to work, out doing the Christmas shopping (it is probably best that I do not start on that one or I will never end), even with just updating this blog so I am sure there will be many more additions to The Weekly Whinge before long.
Read the rest of this entry »
Tags: complain, complaint, new site, rant, whinge
Read full article
Posted by Christopher Shennan December 7th, 2009
A few months ago I posted an article taking about how to get the raw SQL from a Doctrine Query Object but with the release of Symfony 1.3 and Symfony 1.4 it would appear that the code no longer works. As a result I’ve updated the code to work with Symfony 1.2 – 1.4 and you can find the updated source below:-
Read the rest of this entry »
Tags: doctine, doctrine query object, raw sql, Symfony
Read full article
Posted by Christopher Shennan November 22nd, 2009
It’s taken me a while but I’ve finally managed to create the “My Projects” section started although in all likelyhood I’ll not have much time to devote to my projects.
I’ve started off by resurrection an old project that I worked on while I was self employed as Design2Host Ltd. csNews Pro (formerly V-Desk Newsletter System Pro) has had a few cosmetic details changed (changed the name, removed the licence key limitions) but it’s exactly the same project and it is compatible with the paid version that was original available so you can easily convert from the previous paid version across to the free version when any updates become available.
Feel free to download and play with csNews Pro and feel free to give my any feedback on it.
Tags: cNews pro, design2host, v-desk, v-desk newsletter system, v-desk.com, vdesk
Read full article
Posted by Christopher Shennan November 20th, 2009
I am often importing data into a symfony project from an existing site or a CSV file and re-writing this data into the fixtures.yml is usually too complicated or time consuming so I end up writing bespoke import actions.
While I am writing these actions I often find that I have to delete the contents of the MySQL tables as you can never write the routine complete and accurate in one go so as you build it up in smaller steps you find that you have to get rid of the previously old data.
This presented me with 2 problems:-
- Using DELETE FROM [TABLENAME] does not reset the auto-incrementing fields so if you have anything that is based on the id during the rest of the import then you’re going to have issues.
- There is a lot of clicking in phpMyAdmin to empty the tables, especially if you forget about the foreign key relationships.
Read the rest of this entry »
Tags: doctrine truncate table, mysql truncate table, symfony import routines, symfony truncate table
Read full article
Posted by Christopher Shennan November 15th, 2009
Another day… another magento problem!
I was asked to look into a problem with an automated stock level update script not updating the stock levels. This update script was using the Magento API and on the face of things everything looked ok as the script ran without any errors, the product prices got updated but the stock levels never changed.
After a bit of investigating I found the problem was caused by an incorrect usage of the Magento API and the original update statement was similar to:-
$proxy->call($sessionId, 'product.update',
array('PRD0001',
array(
'price'=>12.50,
'qty'=>12,
'is_in_stock'=>1,
'discontinued'=>0
)
)
);
However, the update of the is_in_stock and qty fields is not done against the product (via product.update) but against the product inventory (via product_stock.update) so this code had to be updated to the following:-
Read the rest of this entry »
Tags: Magento, magento api, magento stock levels, product.update, product_stock.update
Read full article
Posted by Christopher Shennan October 29th, 2009
Back in February 2009 I treated myself to a Resident Evil XBOX 360 Elite from Game and in all honesty I haven’t really played it much. It’s only been on maybe 10 days since I’ve bought it but I’ve got a bit more time of my hands these days so I’m starting to play it more and I’ve noticed that is sounds like a hoover when you’re playing a game.
I’m usually playing my XBOX at night and I have to keep the TV volume down so the audio is instantly drowned out by the noise of the XBOX and I would actually go as far as saying that my hoover is quieter than the XBOX (that may be a slight exaggeration but not by much!) so there isn’t that much that I would consider “Elite” about this XBOX.
Read the rest of this entry »
Tags: dyson, xbox, xbox noise, xbox noise problems
Read full article
Posted by Christopher Shennan September 22nd, 2009
This has been updated to work with Symfony 1.3/1.4 – Please go to the updated article: Raw SQL from Doctrine Query Object – Revised
As my use of Symfony is increasing I find myself frustrated that there doesn’t appear to be an easy way to get the raw SQL from a doctrine query object so I can simply output it and paste it into phpMyAdmin to debug problems with the SQL. I may be wrong about this but as yet I have not found a built in function to perform this operation.
Sure I am able to output the query with the “?” indicating where the necessary values are to go and I can also easily output the array of query parameters so I can substitute these manually but this takes time and it would be much much simpler and quicker to just output the whole query with the substitution already done so it’s a simply copy and paste of the raw SQL from the doctrine query object straight into phpMyAdmin.
I have wrote a quick function to do this and I had meant to post this for a while but I just have not had the chance to get round to it until now.
Read the rest of this entry »
Tags: doctrine, PHP, SQL, Symfony
Read full article
Posted by Christopher Shennan August 24th, 2009
How many times have you searched for the answer to a problem in Google to find nothing but forums with people who have the same questions but no solutions posted even though the question was raised months, even years earlier?
If you post a question and no-one managed to provide you with an answer do you:-
- post up your solution when you’ve found it? or
- simply forget about the post and leave everyone else to figure it out themselves too?
Unfortunately there are a number of people in the latter category (myself included from time to time) and being a web developer means I run into this type of issue more than I would like but, I’ve recently come across yet another great reason why you should go back and answer your own question when you have managed to work out the answer.
Read the rest of this entry »
Read full article