Patching Refeed for PHP-CGI

If you’re not interested in Reblog, Refeed, or PHP-CGI, I recommend you skip this post.

Lately I’ve been working with various combinations of aggregators, tagging, ranking, and presentation systems. Here are some fixes for anyone who is trying to get Reblog / Refeed 1.3 running on a hosted web service.

I’m mostly using Dreamhost, which is presently running PHP 4.3.10, and offers a choice of PHP as an Apache module or PHP-CGI. These installation problems are likely to occur for anyone running Refeed in a PHP-CGI environment. The initial symptoms are that the HTTP authentication dialog will pop up when you try to view the Refeed control panel, independent of whether credentials are defined in init.php.

The main issues:

  • Refeed installs and runs as packaged, but only if it’s running as an Apache module. This is a security problem in a shared hosting environment
  • The security problem can be partly addressed by enabling PHP-CGI (which is the default at Dreamhost and other hosting services), but this breaks the default Refeed configuration
  • The reason it breaks is because PHP’s built-in HTTP basic authentication fails during the initialization
  • Another reason it breaks is because the $_SERVER[’SCRIPT_NAME’] variable is set differently in a PHP-CGI environment.

The solution:

  • Comment out the PHP HTTP authentication in init.php
  • Add .htaccess, if desired
  • Modify add.php to include
    $_SERVER[’SCRIPT_NAME’] = $_SERVER[’SCRIPT_URL’];

Here is a lengthier and possibly more current set of notes.

Tags: , , , ,

 
Google

 

3 Responses to “Patching Refeed for PHP-CGI”

  1. Ralph Says:

    I can’t register for the wiki and therefore not read it in full length. Any chance, you could mail me the article, or provide a registration feature for the wiki?

  2. Andrew Says:

    I can’t log in to your wiki.
    I’m dying to know how to fix this issue.

  3. her divine shadow - all in one place » My del.icio.us bookmarks for November 17th through November 18th Says:

    […] Ho John Lee’s Weblog » Patching Refeed for PHP-CGI - tags: howto refeed reblog […]

Leave a Reply

  • A Random Selection of Other Fine Posts

  •  
    Translate this page
    German Flag Spanish Flag French Flag Italian Flag Portuguese Flag Japanese Flag Korean Flag Chinese Flag
    Plugin by Taragana
    Google
    Web hojohnlee.com

    •  

     

     
     

    © 2004-2008 Ho John Lee