Tag: PHP

XAMPP

In my copious spare time I have been known to design and build websites. The first website I ever built was for the first company I worked for, back in 1996, so I’ve been at it a while.

However it’s only been the past couple of years that I’ve started to get some larger clients with grander ideas, and that has meant getting a bit more organised. As such I now have a standard questionnaire that I ask all prospective clients to fill in, a standard design proposal document which I use to present back my ideas based on the answers to the questionnaire, and I have a nice little area of my PC which is dedicated to building websites.

The key part of which is XAMPP.

I discovered this marvellous application about 3 years ago, and if you are building websites, or installing and customising anything that requires MySQL and PHP then you must give it a look.

Many people know from their own experience that it’s not easy to install an Apache web server and it gets harder if you want to add MySQL, PHP and Perl.

XAMPP is an easy to install Apache distribution containing MySQL, PHP and Perl. XAMPP is really very easy to install and to use – just download, extract and start.

It really is that simple. Once you’ve downloaded it, start up the Control Panel, start Apache and MySQL, then head to http://localhost. Done!

A lot of my web design work is creating custom themes based around WordPress, sometimes it is just a look and feel but more often than not custom code is required. Now, rather than having to upload a file to a test web server somewhere, I can work locally on the php files, and just refresh the browser to see my changes. Much faster.

XAMPP is one of those applications that, after you’ve used it once you think “how the hell did I manage without this!”.

Given that a lot of technical communicators are looking towards other distribution models (blogs, Wikis and so on), then XAMPP is an easy (and free) way to get a test system setup, allowing you to run short proof of concept projects. I hope you find it as useful as I do.

What of Scottish Blogs?

But first, a cat update: Ollie is fine, no cone as, apparently, they don’t use stitches any more? He was a little groggy last night but was up and hungry as usual this morning. And I said this wouldn’t become a ‘cat’ blog. Hmmmm.

And so, onto Scottish Blogs. The website lost hosting late last year, and whilst I have a backup of the database that was only a week old, most of the site details in the directory are safe. However I’m now faced with starting over from scratch which, from a coding point of view, is a good thing. When I built Scottish Blogs it was largely done piecemeal as I was learning PHP as I went, leading to problems later on that, with my lack of knowledge, I couldn’t have foreseen. So, a clean slate is a good thing and would allow me to ‘get it (more) right’ from the start.

However, to be frank, I’m not sure I have the energy, inclination nor desire to rebuild and relaunch the site and, judging from the paucity of emails bemoaning the death of the Scottish Blogs website, I can only presume that no-one else is missing it either. So why am I bothering?

At present I’m not sure what, if anything, will replace the Scottish Blogs directory. Whilst I harbour grand plans of growing an online community, I’m not entirely sure I have the bandwidth to do so at present. With that in mind I’ve quite deliberately not done anything with the website since it died late last year and the overwhelming silence confirms that it was probably about time I killed it anyway.

Yet somewhere, in the depths of my brain, I am sure the site was useful to some, so I remain unsure as to the final fate of the website. Perhaps I need to co-opt some volunteers to help get it back off the ground, perhaps I need to hand over the entire thing to someone else (unlikely, but possible), or perhaps I need to make more of an effort to illicit some feedback from others.

Regardless, this isn’t something I’ll be looking at anytime in the next couple of weeks, that’s for sure.

Mooo.. scellaneous

Nature is a wonderous thing, offering us such beauty and inspiration that sometimes it boggles the mind. Be it a particular cloudscape, a shimmering lake or the steaming placenta lying next to a just-born calf…

OK, it wasn’t ideal to see such a sight first thing in the morning but it certainly woke me up. Thankfully I hadn’t had breakfast (I’m munching on my All Wheat Muesli as I type this). However as spring rolls on, it seems that new-borns are in the air, so let me pause here to congratulate my mate Bill and his lovely wife Fran on the birth of their son, Gregory. I’m sure that, with the many years of loving and careful nurturing that they’ll give him, he’ll soon be a rampant alcoholic likes his Dad. I’m kidding of course, it’s his Mum that’s the alcoholic…

~

Since returning from Spain we’ve done little of note. That makes for a dull blog, but of course I can always fall back on techy stuff. Which is just as well as the ‘human interest’ side of life is a little flat at the moment, unless you allow me to rant on about the various arseholes I deal with every day on my daily commute. Ohh go on… BMW drivers aren’t all that bad, van drivers can be the most maliciously dangerous wankers, and don’t even start me on private taxis!!

~

Of course I’ll have human interest overload come Saturday as it’s blogmeet time again. For anyone travelling through from Glasgow, aim to take the 12noon train (GNER to London Kings Cross). The train stops at Motherwell, where I’ll get on, and Edinburgh Waverley. Let’s meet on the last carriage (the back of the train).

If you are still interested in going but are unsure of directions and whatnot then drop me an email (gordon AT gordonmclean DOT co DOT uk).

~

Which reminds me, a couple of people have tried to contact me using the contact form on this site. Unfortunately, since moving hosts it’s not been working. I think I know why (I need to check if my host has PHP mail() installed) but until then, you can use the email address given above.

~

On my last day of work before my holiday a calamity occurred. I dropped and broke my mug! This week I’ve been using the bone china, company branded, mugs but they are too small in both handle size and coffee holding ability, so the hunt for a new mug has begun.

As I’m sure you’ll all know by now, I’m a right fussy bugger, so I need a mug with a decent sized handle, and a nice design. My last one was a good size, and a solid dark blue colour with white interior. I’m thinking of going for stripes this time, but have to admit that I’ve yet to find a mug (online) that really catches my eye.

Anyone else tried shopping for mugs online? Any pointers?

And no, I don’t want one of those insulated ones, can’t stand them as … and remember, I’m fussy … the lip of the mug is usually way too thick to be comfortable. Yeah, I know, I know. I’m a freak.

~

Right, I’m off to price a wireless card for my PC, a DVI to HDMI converter, and a tub of Vaseline. The latter is required after wearing a slightly coarse top under my running jacket on Wednesday night; 45 minutes of friction is sore on the nipples!

Post of the Week Launches

As mike says (and from where the bulk of this post has been lifted) Post of the Week is ready, and open, and waiting for YOU.THE MISSION.

  • To highlight great writing on personal blogs.
  • To draw attention to blogs that you might not have heard of before.
  • To point you to one absolute guaranteed humdinger of a blog post, once a week, every week.

Finally, and almost a year after the idea was first mooted, Post of the Week is ready for public display. I bet you never thought you’d live to see the day, did you?

Absolutely everyone everywhere is heartily recommended to do any or all of the following:

  • Nominate cracking good blog posts for inclusion, via the comments box in the “Call for nominations” section.
  • Volunteer their services as a guest judge, for one weekend only.
  • Publicise the site on their own blogs. Pimp it, kids. Pimp it HARD.

For those of you who don’t know, I (with my one man hat on) had the privilege of designing the site, and I HAVE to say a huge thanks to the ever helpful and hugely generous Lyle, without whom the site simply wouldn’t work. What that man can do with PHP boggles the mind. Cheers mate.

And many congratulations to The Overnight Editor for writing this week’s inaugural featured post.

So, what are you waiting for, get over there and get involved!

Weekender

Ahhh holidays. Well two days off at any rate.. better than a poke in the eye with a sharp stick, right?

Busy weekend saw me out on Friday night for a leaving do, always nice to enjoy a few shandies in the sun. Met a couple of interesting people as well, which is always good, one of whom had actually heard of blogging! Such a small world. Or not.

Saturday was a bit blurry until the afternoon when I enjoyed a stroll to the station on a glorious afternoon. Thankfully there were no “confrontations” to be had on the train through to Dumbarton where I met up with Louise and headed to her cousins for a barbeque. Sunday was a bit lazy but still got a few bits and bobs done before settling down to watch Sideways —wonderfully poignant— and Mystic River.

Sideways was truly a joy and I’ll definitely be watching this again. Both quirky, awkwardly funny, and genuinely moving all at once, it’s my kind of movie. Well worth a quiet watch. Unfortunately Mystic River wasn’t as good as I’d been led to believe, not that it was bad but it certainly didn’t make a huge impression. Fairly emotive topics granted but beyond that it seemed a little too single paced, too methodical and because of that lost a lot of punch.

And that brings us to today. Today I’ve watched the Lakers come from behind to steal an overtime win to go 3-1 up in the first round of the playoffs, Kobe the main man yet again. I’ve also spent a few hours cursing and swearing at some PHP and I think it’s finally given up the fight and decided to play ball.

I’ve also eaten an entire box of dark chocolate Tunnocks teacakes. Delish. But now I feel bad. Guilt is a terrible thing.

Today…

… I will mostly be meeting met “BritBlog” Mark (he’s organising a blogmeet dahn sarf by the way). It was Be good to finally meet him having exchanged so many, and some heated, emails in the past year or so.

We chatted about this and that but mainly, obviously, the plans for the merger of Scottish Blogs and Britblog. Over the past couple of months since the first announcement we’ve been round the house with the design and now we both agree that we’ve got a good model to take forward. We’ll issue an update soon, but I have to admit that I’m getting a little excited about things.

Mark’s a great guy, very self-effacing and I think meeting face-to-face will make a big difference from here onwards. You get so much more from body language than you can ever expect to be conveyed in email or IM conversations.

But you all know that right. It’s the same for blogs.

Anyway, I’m hoping to ramp up my involvement very soon, just need to get ONE LINE of PHP to work and I can knock a certain site on the head. It’s missing some features that I’d wanted to implement but time constraints mean I’m just glad to hit the 80% mark (well maybe closer to 90%) and I can leave the remaining “nice to have” items for another time (possibly in the autumn).

I also need to follow up with a few people who I emailed several weeks ago on various topics. If you’ve been waiting for me to get in touch then stand by your PC…

So, I’ll leave you with that Tammy Wynette chiclete de ouvido crawling into your brain shall I?

Ohhh a Sing-a-long!

Sometimes its hard to be a system
Giving all your love to just one file
You’ll have bad times
And it’ll have good times
Doing things that you don’t understand

But if you love it you’ll forgive it
Even though it’s hard to understand
And if you love it
Ohhhh be proud of it
‘Cause after all he’s just a computer..

[do de do de doooo]

Stand by your peeceeeee
Give it two arms to cling to
And something warm to come to
When nights are cold and lonely

Stand by your peecceeeeee
And tell the world you love it
Keep giving all the love you caaaaaaaan

(sorry)

Damned lies and stats

Blogging malaise? Pah, easily solved. Check your stats!

Except it’s not always that easy.

Personally I’ve been using Extreme Tracking for quite a while now, but it’s not that reliable as it seems my “hit count” is always lower there than anywhere else. The Sitemeter site appears to be dead – although I’m sure I received my weekly email from them last week – Re_invigorate appears to have stalled, and the details offered as part of my hosting package are fine for raw numbers but don’t include referrers and whatnot (unless I’m missing something, any 34sp customers wanna put me right?).

So it was with some interest that I read yesterday’s announcement about a new stats package called Mint (not sure the credit card people will be too happy with that…). Created by Shaun Inman it certainly LOOKS very nice, but I think it may only appeal to a certain type of user as it doesn’t have a free (cut-down) offering. I would venture that this is on purpose to ensure the quality of the service remains high, but I think that at $30 a site it’ll still attract some customers. Jon Hicks has more details.

Now, a feel eagle-eyed readers may have spotted a few funny ‘code’ messages appearing at the top of my site a couple of weeks back, and with a huge slice of coincidence (side helping of “who’da thunk it?”) I can now tell you what that was… of course if you didn’t see anything untoward then apologies for wasting the last 6 seconds of your life, please don’t hate me but DO read on..

I spotted a call for testers a few weeks ago and thought I’d give it a go. The details were scant but legitimate, with all that was required to help test this new “web app” was a few lines of PHP on my site as the developer wanted to gather some stats from various sites. Those stats have been whizzing back and forth for the past couple of weeks and it’s only now that I can tell you what it’s for and confirm to myself that I was right with my initial guess (which I didn’t blog about as the testing was to be carried out in “secret”, honest!).

Yes, you’ve guessed it, I was helping test a new stats package! This one is called Vestigo and BETA sign ups are now open. As it’s creator, Ben Sekulowicz, says it’s:

“a community driven visitor tracker – On a basic level, it gives you a (IMO) very good statistics, traffic and trend tracking package… On an entirely new level, you can cross reference your data with everyone else’s – to see how your browser stats compare to similar sites, what people who visit your site look for on other sites and where in the world your visitors come from.”

Can’t say fairer than that I guess. Currently it’s only available for PHP enabled sites, and testing has only included Firefox and Safari but if you ask me, it looks pretty damn good (check out those browser stats!). The accuracy of the stats seems to be pretty spot on as well (in comparison to my host provided stats) and there are some nice touches including a Google Map hack to display the physical location of your visitors.

Update: Just had an email from Ben where he pointed out another neat feature. If you have looked at the screenshot, above, then check out the details you get when you click on the Referrer time link (the “When” column on the left), some more details about the visitor (the location may be off as it is probably based on the IP address).

As always you should remember it’s still in BETA but I always take the view that this is a good thing as you could possibly influence new/improved features in the product. Sign up and have a look.

So there you have it, two new stats packages in one day. What are the chances?

MySQL Help

OK, techie request time people. Those of a non-technical, anti-acronym mindset should look away now.

I think I’m getting hacked. Well not here, Scottish Blogs.

The Scottish Blogs site uses a MySQL database to store the member details. The submission form calls a separate PHP page which does a little checking (to make sure duplicate URLs and email addresses aren’t added) then throws the info into the database. The database connection details are held in a separate PHP file which is included as and where needed.

I’m pretty sure that someone has managed to figure out how to write to the database directly. I’ve taken the submission form offline for the past few hours but I’m still getting new “spam” sites added, I’m currently getting around 15 – 20 “spam” submissions a day, mainly from chinese sites/hackers (not really spam as such just illegible nonsense).

So, given those rather skimpy details, anyone got any suggestions on how this is happening and how I can stop them from doing it?

Grayscale this

One for the Lazyweb methinks.

Is there an EASY (non-coder) way to make all images that appear in a DIV, grayscale? PHP is the preferred langauge and you can presume access to the GD Library is available on the server.

Note: I’m aware that IE users can utilise CSS for this but that’s not what I’m looking for so please don’t suggest it.

PoshPaws

Right, I’m pretty sure one of you clever types will be able to point me in the direction of a solution, preferably PHP or Javascript based.

What I’m trying to do is treat an image, and an associated block of HTML (text) as one block. I’d like to be able to swap blocks depending on a mouse click on a navigation link.

Clear as mud? Maybe a visual aid is needed:

visual aid

The orange and yellow bits are the “block”, and the “block” should change when I click one of the links. Sounds simple enough, right? Well I’ve been at this since 10pm to no avail. I’ve had enough. I’m off to bed.

When I check back tomorrow night there had better be some answers!! Or else I’ll … errrr… I’ll? … I’ll be left very very much where I am at the moment, stumped.