WordPress asking for FTP username/password?

Are you annoyed with your wordpress install asking you for your FTP cradentials everytime you try to upgrade a plugin? I know I was.  Thankfully, there’s a simple solution which will save the FTP login (username/password/server) so WordPress stops asking you for them.  Here’s how you do it.

  1. Locate your WordPress root diectory and find the “wp-config.php” file.
  2. Edit the file and insert this somewhere in the middle as it’s own block, we normally put it after the mysql username/password block.
define("FTP_HOST", "localhost");
define("FTP_USER", "yourftpusername");
define("FTP_PASS", "yourftppassword");

Once you’ve made that edit, save the file and voila! No more punching in your ftp username and password all the time.

Rubik’s Cube, my new favorite thing

In my quest to embrace all things geek, I’m surprised that is has taken me so long to fall in love with this staple of geekdom. I am of course talking about the Rubiks cube.

I never had a rubiks cube growing up, sure I played with them but never at any length of time, or the intention of solving one.

The company that I currently work for had a developers conference and had some rubiks cubes with the company logo printed on them. After the conference, some of the left over cubes made their way into the hands of @BoringGeek, @LMajano, and myself. Nothing could have been crueler then handing some engineers a puzzle like a rubiks cube. I’m not going to lie, I physically lost sleep trying to solve the cube, but I had fun doing it.

I eventually broke down and started doing research on the rubiks cube and how to solve it. The more I learned about the cube, the more interested in it I became. I realized that solving the cube required pattern recognition and the implementation of algorithms through a series of motions. It was at that point in my mind that my computer science mindset kicked in and I started to make the cube do what I wanted instead of being surprised by what happened. I was in control of feeding the variables into the function and the function would produce a predictable and consistent result.

I can now solve the cube consistently, and typically around 3 minutes, a far cry from the speed cubing champions of the world, but I’m still proud of myself and continue to have fun solving the cube.

[youtube]http://www.youtube.com/watch?v=dGUWBwg1JDo[/youtube]

timthumb.php returns a 404 Error in WordPress

timthumb is a great little php script that helps create thumbnail images (http://code.google.com/p/timthumb). I’ve used it before, but recently I purchased a wordpress theme that used it, and it wasn’t working.

I would get a 404 error when I tired to access the directly via a url like this:
theDomain.com/wp-content/themes/theTheme/scripts/timthumb.php?src=/wp-content/uploads/2010/05/moose1.jpg&h=207&w=237&zc=1&q=80

After some digging around in log files on my server I realized the error

SoftException in Application.cpp:610: Directory “/home/usernamehere/public_html/wp-content” is writable by others

My problem had to so with the directory permissions! “writable by others” means that the permission on the directory were set to “777”. I changed the permissions of the directory using chmod to 755, and everything started to work.

Lesson learned, if timthumb.php is not working at giving you 404 errors, check the permission of the directory that contains the php file.