LaslowNET Technical Rants, HOWTOs, and Writing

19Aug/100

Fixed: Can’t Resize Uploaded Images in WordPress

Here's one with an easy fix. If you've just installed WordPress on your server and can upload images but WordPress doesn't let you resize them in the same form, SSH in to your server and do the following:

yum install php-gd

service httpd restart

And you're done! ...At least, as long as you're using an RHEL-compatible Linux distro. If not, use your package manager of choice, or manually find and load the php-gd extension!

11Jul/102

Fixed: Broken Permalinks in WordPress

I recently moved servers to a new host (a friend of mine had provided me with a free CPanel account on his VPS before this), and the transition had appeared to work rather well. Then, when I checked my blog stats this morning, something seemed off:

Blog Stats

See that last big dip? Guess when that happened!

So I started looking around the site, and sure enough - the main pages displayed fine, however everything else was broken. In fact, anything with a 'fancy' permalink was 404'ing.

Once again, a quick Google search lead me to this thread on the WordPress forums. After digging around, I found the problem - in Apache's httpd.conf file on my new VPS, I needed to change the following line:

AllowOverride None needed to be AllowOverride All

Note, though, that there are two AllowOverride entries in httpd.conf - one wrapped in <Directory></Directory> tags, and one all by itself. The problematic one is the second AllowOverride entry that isn't wrapped in Directory tags.

TL;DR Version: If you enable fancy permalinks in WordPress, and start getting 404 errors in Apache even with a proper .htaccess file and mod_rewrite enabled, change AllowOverride None to AllowOverride All in httpd.conf - just make sure you do it to the second AllowOverride entry!

17Jun/100

Meta: WordPress 3.0 Upgrade Complete

I've upgraded to the newly released final version of WordPress 3.0. Everything looks fine, but if you notice an issue please leave a comment on this post.

Tagged as: , No Comments
31Jan/100

Meta: And we’re back!

Alright, I was able to restore my WordPress backup from October, manually re-add the blog entries I posted in Blogger, and made sure that everything at least mostly works. Cool. Tomorrow, a fresh blog post to celebrate!

Tagged as: , No Comments
23Jun/090

Meta: WordPress Upgrade and Theme Change

I updated to the newly released WordPress 2.8 yesterday, which subsequently broke the theme I was using (iNove). I updated to the latest version of the theme, but wasn't very happy with the search box in the header area, so today I switched to Pyrmont V2 and I must say that I'm really happy with it!

In other news, I'll be swapping the hinges and LCD back cover on my wife's Acer Aspire 9300, with before/during/after photos. The hinges on this model are very stiff and eventually break the plastic case, and then warp themselves rending the laptop a desktop. They've already been replaced under warranty, so now it's my turn to take a crack at it. Also, her hard drive is starting to show signs of immediate-total-failure in the form of disk read errors on boot, so that'll be swapped along the way.

21Feb/090

WordPress Installation on Server 2003 x86 with Apache2/PHP5/MySQL5

(This assumes you already know how to actually install Apache2 and MySQL5 properly, and setup a database with a user for WordPress).

A quick note about WordPress installations on Windows Server 2003. After installing Apache2, MySQL Server Community Edition, and extracting PHP5 (Protip: don't use the installer, just download the .zip file and extract it to a folder on your server, eg. C:\php), configure the php.ini file in the PHP directory as normal, with the following changes to avoid issues with MySQL not integrating with PHP correctly:

1) Set extension_dir to the absolute path of the extensions directory. So if you extracted PHP to C:\php, you need to set extension_dir to "C:\php\ext". Do not use relative paths!

2) Remove the semi-colon from the line extension=php_mysql.dll.

3) Set the upload_tmp_dir path to an existing folder. I'd suggest making a new temp folder, such as C:\php\temp.

4) Configure mysql.default_port and mysql.default_host with the correct values for your MySQL server.

5) Set the doc_root parameter to where-ever you plan on storing your the files for your site. This needs to be the same as the document_root parameter in Apache2's httpd.conf.

Now you just need to configure Apache2 to correctly use PHP5. Add the following lines to httpd.conf (note the slashes used - don't use backslashes!):

LoadModule php5_module "c:/php/php5apache2_2.dll"
AddType application/x-httpd-php .php
PHPIniDir "C:/php"

Even though the installation instructions included with PHP say to use php5apache2.dll, we have to use php5apache2_2.dll, otherwise Apache2 will fail to start. All that's left now is to copy libmysql.dll and php5ts.php from the PHP directory to C:\Windows\System32.

With this done, you should be able to restart Apache2, and you hopefully won't get any errors! To test and make sure that PHP5 is working, and that MySQL5 is accessible, create a new file in your site root (the same folder that doc_root and document_root point to) called info.php, and put the following line in it:

<?php phpinfo(); ?>

Open your webbrowser, and type http://localhost/info.php in to the address bar, and you should get the standard PHP Info page. Do a search for MySQL, and you should have a heading for it. If so, you're ready to install WordPress. If not, then double-check your configuration.