Archive for the 'Software' Category

WordPress, Feedburner and sitemaps

If you use Feedburner for your wordpress feed, you probably use the FD Feedburner plugin for WordPress . The plugin is cool because it redirects your users to your Feedburner while letting Feedburner itself accessing your wordpress feed; and it’s really simple to configure.

But if you want to submit your feed to Google Webmaster Tools, Google will be redirected to your Feedburner too. While you may expect it to work, in some case it won’t. If you track clicks on Feedburner in fact, your feed will have changed links in it. Feedburner changes the <link>URL</link> to an internal URL that will redirect to your own URL after tracking stuff.

As a consequence, if you submit your feed as a sitemap on Google Webmaster Tools, Google will show you errors like this:

Feedburner and Google sitemap

This happens because the URLs in the Feedburner feed are not into your own domain but on http://feedproxy.google.com/

To fix this behaviour, easiest solution is having Google accessing your original feed (http://yourblog.tld/feed/) instead of being redirect to Feedburner. This can be easily done with a little change in the plugin.

Edit your plugin (with a text editor accessing the file via ftp, or just from the dashboard -> Plugins -> Editor, and select the FD Feedburner plugin) and look for this piece of code:

function feedburner_redirect() {
global $feed, $withcomments, $wp, $wpdb, $wp_version, $wp_db_version;

// Do nothing if not a feed
if (!is_feed()) return;

// Do nothing if feedburner is the user-agent
if (preg_match(‘/feedburner/i’, $_SERVER['HTTP_USER_AGENT'])) return;

// Do nothing if not configured
$options = get_option(‘fd_feedburner’);
if (!isset($options['feedburner_url'])) $options['feedburner_url'] = null;

Just change the line

if (preg_match(‘/feedburner/i’, $_SERVER['HTTP_USER_AGENT'])) return;

with:

if (preg_match(‘/(feedburner|google)/i’, $_SERVER['HTTP_USER_AGENT'])) return;

and you are done. Google won’t be redirected to your Feedburner feed, and it will use your original feed as sitemap.

Bigdump

Moving a website to a new hosting, i had the problem of importing the database. In fact, export was too much big (30Mb) compared to allowed size of upload files via phpmyadmin on new hosting (1Mb – where “M” maybe stands for “miserable”). Of course, no shell access…

So? Fortunately, i found BigDump, a GPL script that allows to import into the new database the exported file. Excellent!

302 loops with Pligg

Yesterday i spent many hours trying to fix a 302 loop with Pligg (a great piece of open source software to create a Digg clone site), so i’m gonna post here the (easy) solution, just in case someone else have same problem.

Installed Pligg and enabled search engine friendly URL (Pligg calls it URL Method 2), i had a loop of 302 redirects when i tried to visit users page.

Apache’s error log file said “Negotiation: discovered file(s) matching request: /path/to/vhost/domain.tld/htdocs/index.html (None could be negotiated).” and it should had tell me something, but i haven’t be able to look for the solution in the right place (Google is not always the best place…).

Apache’s access log file showed a bunch of 302 redirects. So, the problem was a loop of 302 redirects (and page wasn’t loaded, of course).

Where the problem was? I immediately thought to look in .htaccess file, but after i commented every single rewrite instruction i still had the problem. Then, i looked at Apache’s configuration to remember how virtual host are configured (i use VHCS on the server i installed Pligg).

At that point, something catched my eyes. In fact, vhosts have this line:

Options Indexes Includes FollowSymLinks MultiViews

In .htaccess file i had the line:

Options +Indexes +FollowSymlinks

So, looking for explanation of every option in Apache documentation, i found out that MultiViews was the option giving problems to me (more info here).

And adding -MultiViews to the line above fixed the problem. So, just change

Options +Indexes +FollowSymlinks

to

Options +Indexes +FollowSymlinks -MultiViews

if you have the same problem of 302 redirects loop.

I spent many hours to find it out, so i hope this post can save your time in case you have the same problem.

Mass mailing software

If you are looking for a versatile mass mailing software, written in PHP and freely provided under the GPL, you should definitely try poMMo.