Script to update an OpenShift repository with changes made on server

If you haven’t tried OpenShift yet, you should! Anyway I have a WordPress installation there. When upgrading WordPress to a new version, files are changed on the server but they would be overwritten if I push the repository. So I created a script to download a snapshot of the OpenShift app, extract the changes in… Continue reading Script to update an OpenShift repository with changes made on server

PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes)

I’m a very happy user of New Relic for my websites, even if I’m only leeching on the free tier. One of my WordPress sites, taurin.se has been suffering from this out-of-memory error for quite some time now and I finally tracked it down. New Relic shows the stack trace, with the failing line on… Continue reading PHP Allowed memory size of 134217728 bytes exhausted (tried to allocate 71 bytes)

Incorrect result from WordPress plugin_dir_url

Consider this code in akismet.php from the ubiquitous Akismet plugin for WordPress: define(‘AKISMET_PLUGIN_URL’, plugin_dir_url( __FILE__ )); My WordPress installation is at /usr/share/wordpress, but the Akismet plugin is installed to /var/lib/wordpress/plugins/akismet/ and there is a symlink (symbolic link) inbetween. This means that __FILE__ is /var/lib/wordpress/plugins/akismet/akismet.php but plugin_dir_url does not understand this, and will incorrectly return: /wp-content/plugins/var/lib/wordpress/plugins/akismet/ This is not… Continue reading Incorrect result from WordPress plugin_dir_url

The WordPress Pharmacy Hack

A number of WordPress blogs around the world have been hacked (or cracked, whichever word you prefer) and a "pharmacy" subdirectory have been injected below the WordPress root. I know of these victims at the moment: azin.se benniboedker.dk www.blog-celeo.com www.digitalrights.gr www.toscaninelmondo.org www.vdomck.org www.yerbastory.pl The injected web pages are advertised by fooling Yahoo! search to make… Continue reading The WordPress Pharmacy Hack