Wednesday, June 09, 2010

CPanel, PHP, webhosting and other sundry headaches

I should blog more often (among many other things I should do more often). At least, then I'd probably remember the naming convention I use for my posts, since I like to name them by date. Ah well.

A couple years back, I created a custom CMS in PHP for a client. A friend helped with the web hosting and domain name, and after bungling it for a couple months, the site was rolled out. It was my single greatest achievement at the time, as the site used templates, and (theoretically) could have several templates, and the user (should have been) able to switch look and feels (of course, it was delivered late and lacking in features).

This year, due to some things, I tried out WordPress and wanted to switch the site to it after liking it. Reality soon set in. For some reason, I couldn't access the site's CPanel, so I (thought I) couldn't upload WordPress. My connection isn't the most stable in the world, and after trying to upload it via FTP and failing a couple of times, I asked the friend who helped with the hosting to help with the CPanel issues.

My friend is a busy person, and when he got round to it, he had the same issue, and contacted the provider. He told me he'd gotten round to getting the issue fixed, but on my next attempt to use the CPanel, the same thing came around. I contacted him, but decided to try to get the WordPress working myself. Uploading via HTTP then unpacking the archive didn't work either.

Today, I got an idea: Since the webhost has internet, I could download WordPress remotely and unpack it on the server. I got a solution for downloading the archive and created for unpacking it, but I kept getting errors. When I downloaded Unzipper, I also got problems unpacking. So I cooked up my own script for the remote download. Once I confirmed that fopen wrappers were built on the webhost, it became a simple issue of opening the WordPress download with one file pointer, and copying it to a local archive in 8kB chunks. Unzipper helped greatly with unpacking WordPress (zip archive), and I uploaded a wp-config.php file, and now WordPress' installed! Owing to the instability of my connection, uploading themes has been a challenge, but WordPress' ability to download themes for itself has come in handy. I'll start migrating the site to WordPress and soon move the whole to WordPress. And yes, another attempt to upload a theme to the site just failed. Later.

1 comment:

Ayo said...

This is amazingly strange... I have been fiddling with wordpress for awhile -this is rather strange. I have learnt from it though. Keep it coming.