Tag Archive for: WordPress

A Quick Look at Turnkey Linux

23 May 2011
May 23, 2011

imageNeed a server for a quick little project? Or maybe even for some long-term development? Check out TurnKey Linux and their virtual appliances. This is a brilliant little solution! Just download a Linux-based VM configured and ready to go with whatever your app needs. Very slick.

Turnkey Linux is a virtual appliance library that integrates and polishes the very best open source software into ready to use solutions. Each virtual appliance is optimized for ease of use and can be deployed in just a few minutes on bare metal, a virtual machine and in the cloud.

For instance, I wanted to do some quick and dirty experimenting with WordPress the other day. Downloaded the appliance, fired it up with my VMware Workstations and I had a fully functional server ready to go in a matter of minutes. And not just WordPress; I also had PHPMyAdmin and even Webmin installed, configured and ready to go. Compared to building my own server and configuring it this saved me quite a bit of time.

The WP appliance is just over 200 MB and the VM is configured to run using 256MB of RAM. Works great with VMware Workstation and I have no doubt it would be just fine with the free VMware Player as well (and heck, probably Server and ESX as well but I haven’t tried those yet).

First time you run the appliance you provide some basics (like passwords) and it gets all configured up. When ready you have a nice informative display with everything you need to get rolling:

TurnKey Linux WordPress console

When you’re done with the project, chuck it and start another. You’ll always have a clean playing field. This really takes a lot of time out of starting up a new project or even doing some research. I’m a fan! Give it a shot. They have all the major CMS, blogs, and popular apps all ready to go.

There’s also the Turnkey Hub but I haven’t done any work with this one yet. Looks like a quick way to deploy a server to Amazon ECS if you’re into that sort of thing.

WP Schwag

22 Aug 2010
August 22, 2010

Look what I got in the mail this weekend:

WordPress schwag

Pretty cool, eh? Back of the shirt has a WordPress.org logo.

I believe this is something I got for weighing in on the GPL side of things during last month’s Thesis theme / GPL kerfluffle.

I dig the certificate ;-)

WordPress: Fixing Bad Feeds

06 May 2010
May 6, 2010

Earlier today I was messing around trying out a new feed reader. To get things rolling I went to add my own site to test with – but couldn’t! The reader returned an error saying that my feed was bad. What I expected to be a quick fix became a bit of a quest…

Here’s what checking my feed in a browser showed:

XML Parsing Error: XML or text declaration not at start of entity
Location: http://localhost/solotech-dev/feed
Line Number 2, Column 1:<?xml version="1.0" encoding="UTF-8"?>

Viewing source shows a completely empty line before the feed’s XML starts.

Now, I have seen this error countless times while volunteering at the WordPress.org support forum so I knew right where to start (after disabling any caching plugins, of course):

Check your wp-config.php file for white space (spaces or blank lines) before the first <?php or after the closing ?> tags.

I saw no issues there, so on to the next step:

Check your current theme’s functions.php file for white space before the first <?php or after the closing ?> tags.

Still nothing. Hmmm… In my experience it is usually one of those two. But hey, we’re not done yet. Onwards, but with much less of a smug feeling:

Check the active plugins php files for white space before the first <?php or after the closing ?> tags.

See a trend here yet? ;-)  But alas, no issues there either.

Now I was starting to get nervous. Where could the extra line be coming from? I’ve heard good things about a WordPress plugin called fix-rss-feed so I installed it and gave it a shot. It goes through all the PHP files looking for whites pace issues as described above and fixes them. I’ll give it credit as it found a lot of them, but ultimately I still had the same issue.

Next up in the diagnostic queue?

Disable all plugins and re-test.

Nope, issue is still there.

Change to Default theme and re-test.

Ah ha! My feed suddenly worked. So now I knew it is something with my current theme. That gave me hope.

While bemusedly staring at my theme’s functions.php source, I finally saw the issue. It wasn’t white space at the beginning or end of the file. Oh no, that would be too simple. Instead, it was an extra blank line between two of the PHP functions. Doh!

That cursed blank line

I deleted that (hilited yellow) blank line and my feed was back in good shape — and I had a new trick to add to the diagnostic toolkit.

Quick Fix for URL file-access is disabled Issues

07 Apr 2010
April 7, 2010

While working with a 1and1.com hosted WordPress blog I hit a PHP error:

URL file-access is disabled in the server configuration

This error arises when allow_url_fopen is set to “OFF” in the server’s php.ini file – which is the default value for (I believe) PHP 5. That setting controls your script’s access to the include and require statements and access to remote files. As such, there are certainly security concerns, so don’t follow my suggestion below until you understand if you really need it, why you need it, and that your script is safe and sanitizing data.

Just like my last Quick Tip for 1and1.com this is another quick fix, just a little different. If you manage your own server, just locate and edit the php.ini file. However, for folks using shared hosting (I suspect the majority) that’s not going to be an option.

However, you may be able to create your own “local” php.ini file. Add the following line:

allow_url_fopen = ON

Save the php.ini and upload it to the main directory of your site and test. For my 1and1 hosted app this worked instantly and solved my issues.

I’ve seen similar solutions that involve adding the following to the .htaccess file:

php_flag allow_url_fopen on

With 1and1, though, this only generates HTTP 500 errors and a busted app. However, it is definitely worth a shot on other hosting company servers.