Fix Internal Server Error when Installing GetShopped Plugin

In some cases you might be getting a blank (white) screen when trying to active the “wp-e-commerce” plugin from GetShopped.org

Or, a blaring 500 Internal Server Error

This may be caused by an out of memory error thrown by PHP. To check if this is the case you’ll need to take a look in your php error_log. You’ll see something like:


PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in ...

The Solution

If you’re allowed to change the php.ini file on your system then you’ll want to increase the memory_limit to something like 64M, or something bigger than it is now.

On a Shared Hosting platform, or where you don’t have access to the php configuration you’ll need to ask your kindly hosts if they’ll increase the memory_limit for you. Cite the problem, link to this post and that should give them enough info to make the changes for you.

Branching, it’s not just a fad

Not like planking was, anyway…

There was one quote that really got to me this week:

Why do we branch? Isn’t branching bad?

No. Branching, when used this way keeps your trunk clean.

It made me realize how dirty my trunk really is. I mean we all get dirty trunks now and then, but if you’re not branching regularly you may be suffering from a dirty trunk.

Luckily, we have some nice fellows to explain how to branch, branching in groups and general tips on how to keep your trunk clean when the going gets tough.

Sequel Pro and MAMP – Connect by socket

I don’t think sequel pro will ever be a replacement for phpmyadmin, but the user experience makes me want to use it as much as possible.

To get started with a MAMP server setup you just need to find the socket mysql is using, and plug it into sequel pro.

Choose connect by socket in sequel pro and enter this as your socket:

/Applications/MAMP/tmp/mysql/mysql.sock

You can check you’ve got the right path by looking for these lines in your my.cnf.

For MAMP Pro, go: File – Edit Template – MySQL my.cnf

Done.

Hide Zend Studio project files from SubVersion

When you check out a repository and create a new Zend Studio project from it you will find three new hidden files in the root of your svn repository.

To hide these from within Zend Studio, right click the Project, go down to Team, and select “Set Property”

The property you want to set is:

svn:ignore

And the files you want to add in the value field are:

.buildpath
.project
.settings

Now commit your changes and the property for svn:ignore will be sent to the SubVersion repository, you’ll no longer get those hidden files in your repository.

[Solution] “We Were Unable To Decrypt The Certificate Id” – PayPal

My Mum’s website uses PayPal for handling product orders, however after adding the PayPal “Add to Cart” code to a WordPress Post page I kept getting “We Were Unable To Decrypt The Certificate Id” error at PayPal.

It turns out after adding the code in HTML mode you need to go back to Visual mode and click Update/Publish.

Do this and the error goes away, people can happily buy your products and send you praise

Peace
Ant

Zend Studio updates to 8.0.1 – Fixes bugs on editing large files

In all versions leading up to and including 8.0, Zend Studio would hang for about 10 seconds when editing html in large .phtml files. (~1,500 lines)

Zend have released a fix for this, and it’s a free and easy update for you. Load up Zend Studio and…

  1. Go to Help | Install New Software
  2. Set Work With field to: http://beta.zend.com/studio/8.0.1/update and hit enter
  3. Hit Select All, click Next and follow the instructions

This has made a big difference for me, hopefully it fixes a few bugs for you too- Might be nice if it updated automatically, or alerted you to updates that are available.

[Solution] configure: error: no acceptable cc found in $PATH

When trying to run ./configure on php for Mac OS X you may see the following error:

configure: error: no acceptable cc found in $PATH

If that’s the case, simply load up your Mac OS X install disc, go to “Optional Installs” and open the file called “Xcode.mpkg”, leave as default and install.

This will remove the error by installing a compiler that is used when building php. The ./configure script checks for its presence, which is why you see the error in the first place.

You can also run into troubles by configuring/building from a directory with a space in it. This is one example:

configure: error: Cannot find php_pdo_driver.h

Just make sure the chain of folders doesn’t include a space.

Using :remote_cache in Capistrano for Ultra Fast deployments

Setting your deploy via variable to remote cache in the configuration section of your deployment recipe allows you to keep a cached copy of your repository online, and subsequent calls to cap deploy will update the remote cache and copy it across to a new release.

There are no local checkouts, no need for your Internet connection to be the bottleneck, and no need to do any fancy setup.

The first time you run a “cap deploy” the script will check for the existence of /shared/cached-copy/ The directory will be created with a checkout of the latest revision if it doesn’t exist.

In your deploy.rb

set :deploy_via, :remote_cache

Just remember that this copies the repository verbatim, and is not the same as using svn export. So you’ll need to make sure you’ve setup Apache to protect your .svn directories:

<Directory ~ “^\.svn”>
Deny from all
</Directory>

VirtualHost overlap on port 80

This is the warning I was seeing when starting up apache

[warn] _default_ VirtualHost overlap on port 80, the first has precedence

You might be seeing something similar, however in most cases this is how to fix the warning:

Add this line of code to your configuration file (usually httpd.conf or httpd-vhosts.conf)

NameVirtualHost *:80

I kept getting the same warning whenever I (re)started Apache but it didn’t seem to hinder the operation of anything so I left it at that.

Now by adding this line of code everything works fine and Apache boots up nice and clean, just the way I like it.

This is almost exactly the same as the warning you get for virtualhost overlap on 443.