Replacing accented character with it’s standard character in PHP

When writing a function to save audio files with a user friendly filename , as well as a regex to remove any unwanted spaces and punctuation, I needed to replace any accented characters with their standard format.

e.g If I was saving a Beyoncé album I needed the ‘é’ in her name to be replaced with an ‘e’.

The following works perfectly:

iconv("utf-8","ascii//TRANSLIT",$filename);

WordPress: curl_setopt() error when installing plugins on 1and1 host

When trying to install/activate plugins on my WordPress site after having to reset them following a host change, I received the following error

Warning: curl_setopt(): supplied argument is not a valid cURL handle resource in ….

This turned out to be an issue with my 1and1 hosting, and how they configure their servers.

To solve the problem I added the following to my .htaccess file:

Getting 500 Server Error When Trying To Access WordPress Admin Menus

After switching host locations for my wordpress blog at the weekend I found I could not access my website due to errors in various plugins. After renaming the offending plugins’ folders on the server my page was functioning again, but when I attempted to login as admin to reactivate the plugins I was greeted by a 500 error.

After Googling I discovered the following solution was to deactivate all plugins in the database to regain access to the administrative menus.

Find the active_plugins row in the wp_options table,
Change the value of the field to: a:0:{}