Archive for the 'Software' Category

Solved: New WAMP Install Won’t Parse PHP

Wednesday, May 7th, 2008

I spent ages trying to figure out why my new installation of WAMP Server 2 wouldn’t parse my PHP and was spitting it out exactly as-is in the source file. I hoked around in the VirtualHost configuration, because the PHPMyAdmin that comes with WAMP Server was working fine so it had to be something wrong in the VirtualHost that I just configured that was stopping .php files being sent to the PHP parser, yes? No.

As it turns out, it’s much simpler than that. Apache was sending the file to PHP to be parsed, but PHP was ignoring my code. Why? WAMP Server 2 comes with “short open tags” turned off (this may be a general PHP or PHP 5 thing, though not sure). Click WAMP -> PHP -> php.ini to edit the aforementioned file and find the line:

short_open_tag = Off

Replace Off with On et voila.

The ‘more correct’ though long-winded solution is to replace all your <? opening tags with <?php if you’re really keen (though that’ll also mean replacing <?= with <? echo). Me, I think I like my short tags.

WordPress / Fantastico Server Move

Wednesday, May 7th, 2008

I recently moved this site to a new host because of ongoing problems with my previous hosts. Thanks to some intermittent database errors I’d decided it would be prudent to do my first backup in some time at the start of last week. By the end of that week they’d deleted my account, so I suppose I should be grateful their database server was so f**ked. Nevertheless, the move caused a few issues when my new hosts told me the complete backup I uploaded to them was corrupt. I can only assume (because some backups were corrupt and others weren’t) that it was due either to encrypting the archives using AES in Winzip or decrypting them in 7zip.

Anyway, that meant manually creating the accounts, setting up the mail accounts and subdomains in them, extracting the root folders (public_html, mail etc) individually and manually importing the SQL backup. Everything was relatively painless (if dull) however Fantastico wouldn’t recognise my WordPress installations (I had two). To persuade Fantastico that there really were a couple of WordPress blogs I had to do two things:

  1. Extract the \.fantasticodata\WordPress files from the zip (in this case it was called nerd.steveferson.com| ) and upload it to the same location in the FTP server. Of course that bar | made Windows barf, so you’d need to rename it (e.g. using an underscore instead) and replace the bar after uploading it via the FTP client (FileZilla didn’t seem to have a problem doing this).
  2. I think this is might be because the blog’s in the root of a subdomain, but I also had to upload a file called installed_in_root.php from \.fantasticodata to that location on the server.

Once I did this, Fantastico picked up the blog and allowed me to upgrade WordPress to 2.5.1 – no hassle.

What’re you lookin’ at?

Tuesday, April 29th, 2008

Well I thought it was interesting so here’s the top 10 posts on nerd. by number of views (based on the last 500 page hits courtesy of Statcounter.com).

  1. Review: Why the Netgear WG311 v3 Sucks (72)
    Slightly dodgy network card that Netgear don’t seem that fussed about fixing. Bad on XP, it got worse on Vista (see number 4).
  2. Playing iPod Video on Your TV (45)
    Seems to be a lot of people looking for instructions for the iPod Classic. Here’s a tip: sell it.
  3. Server application unavailable: installing IIS on .NET 2.0 (44)
    Seems to be a common problem. Sadly Microsoft’s error message is about as relevant as ever.
  4. Installing Vista (AKA More Netgear WG311 Misery) (31)
    Even more messed up. Thank goodness for Linksys!
  5. Thunderbird/Outlook/Google Calendar Integration (25)
    How to integrate your Thunderbird calendar at home with your Outlook in work, via Google Calendar.
  6. Orange Answerphone (Voicemail) Number for PAYG (23)
    Such a simple problem. Who knew it would be so hard to find?
  7. Stop Monitor.exe Hogging CPU (20)
    Why can’t people just give you a standard installation instead of trying to do everything for you? Help sounds good, until their useful tools start killing your PC.
  8. How to run IIS Web Server in Windows XP Home (20)
    Microsoft’s official line is it can’t be done, but it’s not that tricky.
  9. Making Firefox Scroll With Syanptics TouchPad (19)
    Discovering the solution to making Firefox scroll on my Acer Aspire laptop.
  10. NAS or Home Server (17)
    I deliberate over whether I can justify spending the extra to build or buy a home server before eventually deciding that a Linkstation Live will meet my needs for less than half the price.

I Can Has Vista Sidebar Gadget?

Monday, April 28th, 2008

O hai!

I hart lolcatz.

I hart lolcatz so much dat wun dai I thoughted “I can has lolcatz wen I makes teh pooter turn on?” So I maded a Vista gadjit an now I has new lolcatz every dai.

If u hart lolcatz liek mee an wants lolcatz in ur pooter makin u laff, downlodes mah gadjit. I has tested it 4 liek rly long time. It rly works, srsly. An evry1 needses moar lolcatz.

Kthxbai.

(more…)

More aspnet_regiis Goodness – this time on Vista

Friday, April 18th, 2008

Some time ago I published a blog describing the use of a command line tool called aspnet_regiis.exe to overcome a “Server Application Unavailable” message when I was trying to get ASP.NET working on IIS 6 on Windows XP.

Just now I’ve used the same tool to fix a similar (I think) problem on IIS7 on Vista. I was trying to get some practice with ASP.NET. I’ve already got IIS7 and I’ve already got the .NET Framework 2.0 installed. However it seemed, again, that IIS wasn’t aware of the Framework’s existence. When I tried to browse to a simple Hello World page I was greeted with an HTTP 404 (404.3 to be precise) informing me that:

“The page you are requesting cannot be served because of the extension configuration. If the page is a script, add a handler. If the file should be downloaded, add a MIME map.”

Despite the different error messages it appeared to be a similar problem. Apparently it was. That wonderful little solution again:

  1. Start -> Cmd
  2. Navigate to your .NET Framework directory (e.g. C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727)
  3. Run the command “aspnet_regiis.exe -i”
  4. Wait…

Solved: WordPress Admin Images Missing

Friday, April 11th, 2008

I upgraded this blog to WordPress 2.5 today, and installed a new copy of WordPress on a subdomain too. Both these actions were carried out using cPanel & Fantastico.

When I logged into the backend of the new subdomain there were no images – including no buttons on the rich-text editor (TinyMCE) and no WordPress logo on the login screen.  I later noticed there were also background images missing on the public part of the new blog.  When I right clicked “View background image” on the missing image, it took me to an HTTP 403 (Forbidden) meaning there was a permissions problem. The strange thing was the problem didn’t occur in the nerd. backend.

And the solution…? In this instance it was because I’d enabled hotlink protection in my server to stop other people using images stored at steveferson.com on their sites, because this eats up precious bandwidth.  When I created this new subdomain, I had forgotten about the hotlink protection and so hadn’t added it to the list of sites allowed to link to images at SteveFerson.com.  When I added it everything went back to working as expected.

Solved: Blog XMLRPC 403 Error

Sunday, March 23rd, 2008

I was getting the above error message when I recently tried to set up and try out Windows Live Writer to let me publish to a blog from my desktop without logging into the Admin section of the site. I was felled at the first hurdle when, after entering my b2evolution blog’s details, I was presented with a message informing me that:

The server reported an error with the following URL:

http://www.blog-domain.com/b2evo-path/xmlsrv/xmlrpc.php

403 Forbidden

Thinking it might be a problem with b2evolution, I tried with a WordPress blog. A different message appeared, both on this blog and another:

(more…)

Thunderbird/Outlook/Google Calendar Integration

Friday, March 21st, 2008

Finally I can have events from my Outlook calendar in work sync with my Thunderbird calendar (enabled using the Lightning plugin) automatically. It’s wonderful… or at least it nearly is.

How It Works

I read some time back of a plugin that allows you to sync your Thunderbird/Lightning calendar (or Sunbird if you prefer to use Mozilla’s calendar in a standalone application) with your Google calendar, which I’m sure is useful for some people, but not me. I’ve never used a Google calendar really. However that memory proved useful when I heard that a Google have released a utility to allow you to sync your Google calendar with your Outlook calendar. I’m sure you can see where I’m going with this…

(more…)

Ubuntu Boot Error: “differences between boot sector and its backup”

Sunday, March 9th, 2008

I have my Acer Aspire laptop dual booting Ubuntu Linux with Windows XP but, despite being sympathetic to Linux and interested in learning more about it, I don’t use Ubuntu very often.  One major reason for this was the amount of time it takes to boot up.  Over time I noticed an error message and looking at it began to suspect that this error was partially responsible for the long load times.

There are differences between boot sector and its backup
… [sequences of numbers]…
Not automatically fixing this

According to this forum thread, it seems like this error may have been let loose when I changed the grub configuration to make the OS names a bit more user-friendly and have the system stop booting into Ubuntu by default (the girlfriend isn’t converted yet and even I preferred Windows for regular use). This seems to affect the MBR, which doesn’t overwrite the backup and therefore causes the above problem.

SimonU at UbuntuForums had the same problem on his Ubuntu laptop and posted a solution which I decided to borrow.

sudo cp /etc/init.d/checkfs.sh /etc/init.d/checkfsbackup.sh
sudo rm /etc/init.d/checkfs.sh

I had already hit the button to restart my PC when I thought to myself “I really should have looked at what it was doing  and made sure it was doing it to the right hard drive for my system” and started worrying that I may have just made my machine unbootable. Luckily all was ok and my laptop now boots into Ubuntu in a fraction of the time it had taken before. If I could only figure out how to stop Ubuntu overheating the laptop so much and causing the fan to run at full pelt, I’d maybe use it on a regular basis.

If that doesn’t work for you another thread talks about skipping the file system check (fsck) on FAT32 drives as an alternative solution.

Solved: Override Default HTML Title in b2Evolution 2.x

Friday, February 22nd, 2008

I’d set up my 1.x installation of b2Evolution to use a custom HTML title in the format:

<title>[Post/Page name - ] Blog name</title>

On installing 2.4, however, I noticed that the default title is just the post/page name if it exists and the blog name if it doesn’t (i.e. for the posts list). This was based on a function call to a function called request_title. Google didn’t tell me much about this function (not the 2.x version anyway) so I went hunting and found the function in the file: \inc\_core\_template.funcs.php

(more…)