Archive for the 'Code' Category

A New PHP Development Environment

We’ve been threatening to overhaul our entire PHP development environment for some time, but it has always been something we have managed to put off for as long as possible.  With Dreamweaver lagging further and further behind our requirements and the projects that we are dealing with at work getting more complex we have finally managed to take the plunge and get started on this.

I’ve found that locating really basic information on this has been surprisingly difficult, so have decided to blow the dust off my old blog and put down some notes on what we’re up to.  Hopeful someone else out there might find it useful, or better still offer some tips on how we can improve it further. Read on for more details.

Read more »

PHP IDEs - PHPed

Ho hum.  I had this morning set aside to get stuck in to my look at PHP IDEs and I have to say that it hasn’t been the greatest success so far.

I roped in Tim at work to help me do some of the comparison and we spend a couple of hours trawling the IDE websites trying to compare features.  At the end of that process the main thing we had learned was that the feature sets were pretty comparable across all the IDEs we were taking a look at (Komodo, eclipse, PHPed, PHPedit, & Zen).  It seems that the only way we are going to narrow the list down was by installing each in turn and taking a closer look.

We’ve pretty much ruled out eclipse at the moment.  It seems that neither of the two forks (phpeclipse and eclipse PDT) are going to be what we are looking for.  PHPeclipse sounds like it is developing slowly, barely keeping up with new software versions, and PDT doesn’t seem polished enough at this time). 

We decided to grab two of the others to look at.  Tim is taking a look at PHPedit and I PHPed.

Read more »

Surely Wordpress isn’t this shit.

 OK, admittedly I’m only 2 days in to re-assessing Wordpress (plus a painful week of porting - thank the bigbang that I never posted more in the past), but I am seriously struggling to stay open minded.  Wordpress is undoubtedly the industry leader in blogging packages, and I am determined to work out why, but boy to they do their best to hide the reasoning.

“Issues” that are already making themselves painfully obvious even at this early stage: Read more »

PHP IDEs

One of the motivating factors of blowing the dust off my old blog is that I’m about to start investigating some possible changes to the way we develop websites at work.  This is going to involve looking at quite a few solutions and I thought it might be interesting to get some thoughts on these up on the web as I go through the process. Read more »

Goodbye custom blog… hello Wordpress

In order to get this site up and running again I decided to scrap the custom blog/CMS system and just go with an off-the-shelf package.  It would have been nice to have stuck it out with the bespoke system, but it was clear that I had time to either work on the system OR write content, but not both.  As producing a blog with no posts was pretty pointless (not to mention the fact that this is exactly what I seemed to have been doing for the last year anyway!), I decided just to follow the crowd and reach for Wordpress.

Why Wordpress?

That might sounds like a daft question, but I have previously described Wordpress as “utter shit” quite publicly, so maybe the question isn’t so daft.

Read more »

Dreamweaver impending nightmare

I’ve been a fan of Dreamweaver, the web development app from Macromedia, since I first picked up a license for version 1.2 many moons back. Whilst it is far from perfect (a crappy FTP engine and laughable CSS support spring immediately to mind) it is still leaps and bounds ahead of competing packages.

Like many fans of Dreamweaver I can’t help wonder what will happen to the package now that Adobe (of Photoshop fame) have bought out Macromedia. Such is my concern that Adobe are going to ruin the package that I’ve decided to upgrade to the latest version now before they get a chance to screw with it too much.

Read more »

Essential Software

The new Dell laptop arrived today (very good, but bit too shiny for my liking - more of that another time). Once I had cleared off a few gig of useless crap that Dell had kindly installed, including 5 different AOL programs, I thought I’d load up some essential software before the holiday weekend.

Whilst I am sure that my list of essential software wouldn’t suit everyone, I found making the choices quite interesting. Here’s what I came up with and why:

Read more »

Session IDs in Google

Just spotted that a lot of pages of this site have ended up confined to the supplemental results of Google, effectively being dropped from the main results.
This is an annoying feature of Google in particular in that it does really know how to deal properly with sessions (a way of storing information, such as login status, when you are on a site). Basically every time Googlebot visited it was seeing a different URL and thus assuming that there were hundreds of similar pages on the site.
As a quick fix I have simply added the following to my .htaccess file:
php_value session.use_trans_sid 0
php_value session.use_only_cookies 1

This forces PHP to use cookies to store the session and removes session support where cookies are not enabled. Not really the best solution, but on that will do for now at least. A better approach would be to do something like this on the pages instead:

$spiders = array(”Googlebot”,”WebCrawler, “etc etc”);
$from_spider = FALSE;
foreach($spiders as $Val)
{
if (eregi($Val, $_SERVER["HTTP_USER_AGENT"]))
{
$from_spider=TRUE;
break;
}
}

// Session
if(!$from_spider)
session_start();

This would then only start the session if the user_agent was not a recognised search engine spider. This is effectively cloaking (usually seriously frowned upon), but is one of the few legitimate uses for it.

The second solution is what I would use on a commercial site, but search engine results are not as important for this one so I have just gone for the quick fix.

Reskinned the site

matbennett.comDecided to re-skin this site today as I was getting bored by the grey style that I previously had. Turned out to be quite a good test of the CMS system that I have put behind it as well, as the reskinning took just over 45minutes from start to finish including doing up the graphics.

I’m using a boat picture that I took the other week as the header at the moment. No great reason for this other than it was one of the few images that fitted the top of the page quite well. Might change it periodically.

There are still a few bits to tidy up, but it looks better than it did before. It’s amazing what you can find to do when you are trying to put off decorating your home!

Talkback

I’ve added a couple of extra features to the site today. The most obvious is “talkback” - a way of letting people add their comments to any item or photo posted on the site.

The other is automatic referrer information. At the moment this is just limited to listing the top referrers to the site and the most recent referrers to the site, but it will also soon do the same on an item by item basis.

I look forward to reading a few comments from you soon.

Next Page »