Get RackTables working with php-cgi or fastcgi

If you’ve tried to google “racktables authentication not working after install” you won’t find much, but there is a couple of articles about fastcgi and the PHP_AUTH_PW and PHP_AUTH_USER not being passed correctly. But no real solution to the problem.

I was able to get RackTables working using the following work around posted on http://www.rosmir.org/Index/Docs/archive/LabsFolder/FastCGI which has nothing to do with RackTables.

  1. You will need to add the following to your .htaccess file.
    RewriteEngine on
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
  2. Next you will need to modify the inc/auth.php file and add the following before the function authenticate.
    if(preg_match('/Basic+(.*)$/i', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], $matches)) {
    list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)));
    }
  3. It should look like following below when completed.
    function authenticate ()
    {
    if(preg_match('/Basic+(.*)$/i', $_SERVER['REDIRECT_HTTP_AUTHORIZATION'], $matches)) {
    list($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']) = explode(':' , base64_decode(substr($_SERVER['REDIRECT_HTTP_AUTHORIZATION'], 6)));
    }
    global
    $remote_username,
    $remote_displayname,
    $auto_tags,
    $user_given_tags,
    $user_auth_src,
    $script_mode,
    $require_local_account;
    if (!isset ($user_auth_src) or !isset ($require_local_account))
    throw new RackTablesError ('secret.php: either user_auth_src or require_local_account are missing', RackTablesError::MISCONFIGURED);
    if (isset ($_REQUEST['logout']))

Did you like this article?


0 Shares:
You May Also Like

AMD 64 2000+ vs Intel’s Atom: AMD’s 8-watt processor outperforms Intels Atom

Intel's Atom processor and AMD's 64 2000+ were pitted against each other. And the results were for once in favor of AMD.
In our Munich lab’s duel of the energy-savers, the AMD Athlon 64 2000+ beats the Intel Atom 230 in energy consumption and processing power. Each of the systems was based on a desktop platform. The Achilles heel of the Intel system is its old system platform with the 945GC chipset, while AMD offers a more modern 780G platform. The energy-saving solution from AMD offers more possibilities: it has three times as many SATA ports, possesses better onboard graphics performance, and can also support two monitors. Unlike the Intel solution, an HD resolution (1920x1200) with high picture quality is possible through DVI/HDMI ports. And early information suggests that the AMD Athlon 64 2000+ should cost close to $90.
Read the full article at tomshardware.com
Read More

Mobile Chat iPhone Application Updates and News About Latest Release

I was just forwarded a link to the blog of Mobile Chat's company Twenty08's. You can view it here - twenty08. There is some interesting information that was just posted today. Information that a lot of people have been looking for over the last little while after purchasing the Mobile Chat iPhone Application on Apples Application Store. The two recent posts go in depth into some of the problems with the Mobile Chat Application on the iPhone, a new version being released and how they're trying to fix the problems everyone is experiencing.
Read More