Fixing WordPress Error 500

After this, I’ve learned that its convenient to deactivate all your plugins before updating to the last version of WordPress. Im not sure when I did the last update, but it seems this blog have been offline since then.

This morning I tried to read an article of the blog, and I got an “Error 500″ message. First of all, I checked that my WordPress was working, because I could access to my dashboard. Next step: deactivate all the plugins. But it didnt work. So lets take a look into the Apache log. What I found was:

SoftException in Application.cpp:252: File “/home/xxxxx/public_html/blog/index.php” is writeable by group

Thats it: a permissions problem. So I used Cyberduck (but you can use any other FTP application) to fix it. Delete the “write” permissions of Group and Others:

Permissions-Cyberduck

Note: be sure to apply this to all your files and directories. In my case, as you can see in the image, I used the option “Apply changes recursively”. Your FTP application should have the option to do something like this.

Bookmark and Share

Solving problems with Subversion

While I was updating my local copy of a SVN repository, I got this error:

Can’t copy / move ‘.svn-base’ to ‘.tmp’: The system cannot find the file specified.

The problem was that there were two files in the repository whose names differed only in case (e.g., File.txt and file.txt). This is possible in Unix-based systems, but not in Windows. So due to I was using a Windows computer, I couldnt update my local copy. I you have this problem, just delete or rename one of the files in the repository.

Bookmark and Share

Compiling Erlang on Mac

First of all you need to install XCode, because you will need GCC compiler. These are the steps I followed:

1. Download the latest version of Erlang. In my case, it was R13B02-1, so I got a file named otp_src_R13B02-1.tar.gz
2. After decompressing the file:

$ cd otp_src_R12B-2
$. /configure
$ make
$ sudo make install

These are the standard steps, but I had a problem with the “make” command. I got the following error:

gen/wxe_events.cpp: In function ‘void initEventTable()’:
gen/wxe_events.cpp:277: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN’ was not declared in this scope
gen/wxe_events.cpp:278: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP’ was not declared in this scope
gen/wxe_events.cpp:279: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN’ was not declared in this scope
gen/wxe_events.cpp:280: error: ‘wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP’ was not declared in this scope
gen/wxe_events.cpp:281: error: ‘wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED’ was not declared in this scope
gen/wxe_events.cpp:282: error: ‘wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE’ was not declared in this scope
gen/wxe_events.cpp:283: error: ‘wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK’ was not declared in this scope
make[4]: *** [i386-apple-darwin9.8.0/wxe_events.o] Error 1
make[3]: *** [release] Error 2
make[2]: *** [release] Error 2
make[1]: *** [release] Error 2
make: *** [install.libs] Error 2

The solution was to build Erlang without wxwidget support, so the steps I followed were:

$ cd otp_src_R12B-2
$. /configure
$ touch lib/wx/SKIP
$ make
$ sudo make install

Bookmark and Share

Fix the Home and End keys in OS X

There is one thing I dont like about Mac OS X: the behaviour of the Home, End, PagUp and PagDown keys. I you want the same behaviour than a Windows or Linux computer, open a text editor and write this:

{
“\UF729″ = “moveToBeginningOfLine:”;
“$\UF729″ = “moveToBeginningOfLineAndModifySelection:”;
“\UF72B” = “moveToEndOfLine:”;
“$\UF72B” = “moveToEndOfLineAndModifySelection:”;
“\UF72C” = “pageUp:”;
“\UF72D” = “pageDown:”;
}

Save the file as DefaultKeyBinding.dict into your ~/Library/KeyBindings directory and reboot your Mac.

Bookmark and Share

Showing hidden files in Leopard

I’ve found a very useful widget. It adds a button to your dashboard to easily show or hide the hidden files in your system. Install it, press “Show”, and you will see your hidden files in Finder.

Dashboard widget

Bookmark and Share

The Class java.util.Properties

I didnt know this class before start using it some months ago. Now I love it because it makes easier the handling of properties in your Java code.

public class Properties extends Hashtable {

protected Properties defaults;
public Properties();
public Properties(Properties defaults);
public String getProperty(String key);
public String setProperty(String key, String defaultValue);
public Enumeration propertyNames();
public void load(InputStream in) throws IOException;
public void save(OutputStream out, String header);
public void list(PrintStream out);

}

It extends java.util.HashTable, so this class stores each property as a pair of (key, value). If your application needs some parameters to work, you can include them in a file, and then, use a java.util.Properties object to load them.

Properties props = new Properties();
FileInputStream file = new FileInputStream(“propertiesfile.txt”);
props.load(file)

Using these three lines, you will have a java.util.Properties object filled with the content of “propertiesfile.txt”. But, whats the format of this file? It has to contain a pair per line, and both of them have to be separated by a white space, ‘=” or ‘:’. The following file would be correct:

Property1=Value1
#This is a comment
Property2:Value2
Property3 Value3

After loading this file, how can we access the properties? If we want to use the value of “Property1″:

String value = getProperty(“Property1″);

Or if we want to modify the value of “Property2″:

setProperty(“Property2″,”New value”);

More info: java.util.Properties

Bookmark and Share

How to edit PATH variable on Mac

If you need to change your PATH variables (or another environment variable, as CLASSPATH) on a Mac OS X, you need to edit a file called .profile located in your home directory. Open a terminal window and type:

open -e ~/.profile

In case you dont have a .profile file, you have to create it:

touch ~/.profile

You have to include a line like this:

export PATH=(path-you-want-to-add):$PATH

For example, lets imagine you want to add the file whatever.jar, located in your Documents folder. You would write:

export PATH=~/Documents/whatever.jar:$PATH

Easy, isnt it?

Bookmark and Share

Eyes Like An Angel Smiles Like A Devil

Im sure this post is gonna be very useful to a lot of people. Here you have the lyrics of “Simple songs”, from Big Dad Voodoo Daddy. What was the name of the song again?

“Simple Songs” by Big Bad Voodoo Daddy

Simple songs about simple things
Is what makes my baby swing
Shes got eyes like an angel smiles like a devil
Man you know she’s the real thing
so
When my baby’s not around
The whole world hears my poor heart pound
Cause
“Man you know that she’s the one for me”

When I see that crazy smile
Makes it all well worth while
Love my baby can’t deny
Couldn’t hide it if I try

So at the end of the day I can clearly say
She’s the only one for me.
No one else Id rather see
Nowhere else I’d rather be

Than hangin’ with my baby tight
Morning, afternoon & night
Love that girl I can’t deny
Couldn’t hide it if I try

If you wanna know more, the keyword is “notpron” ;)

Bookmark and Share

The appropriate term

Bookmark and Share

Fixing WordPress Error 406

Let me guess: you are trying to edit posts or pages in your WordPress blog and you got “Error 406, Not Acceptable. An appropriate representation of the requested resource /wp-admin/post.php could not be found on this server”. Ok, dont panic, lets fix it.

In the root directory of your WordPress installation, you should have a file called “.htaccess”. You have to edit this file, adding the following line:

SecFilterEngine off

With this single line, your blog will work perfectly.

Bookmark and Share

Powered by WordPress with GimpStyle Theme design by Horacio Bella.
Entries and comments feeds. Valid XHTML and CSS.