[racktables-users] Re: Windows issue with new install

  • From: Olivier Contant <Olivier.Contant@xxxxxxxxxxxxxxxxx>
  • To: "racktables-users@xxxxxxxxxxxxx" <racktables-users@xxxxxxxxxxxxx>
  • Date: Mon, 7 Jul 2014 14:54:58 +0000

Hi, can you open a bug report please.  Left like this on the mailing list, it 
will get lost in the twilight.

Olivier Contant
System Administrator, Triton Digital

1440 Ste-Catherine W., Suite 1200 | Montreal, Qc, H3G 1R8
Tel.: +1.514.448.4037 #2771 | Toll-Free: +1.866.448.4037 #2771
olivier.contant@xxxxxxxxxxxxxxxxx


-----Original Message-----
From: racktables-users-bounce@xxxxxxxxxxxxx 
[mailto:racktables-users-bounce@xxxxxxxxxxxxx] On Behalf Of Aaron Dummer
Sent: Saturday, July 05, 2014 3:44 PM
To: racktables-users@xxxxxxxxxxxxx
Subject: [racktables-users] Re: Windows issue with new install

> Notice: Use of undefined constant CODE_VERSION - assumed 
> 'CODE_VERSION' in C:\xampp\htdocs\racktables\wwwroot\inc\init.php on 
> line 45
>
> Notice: Use of undefined constant CODE_VERSION - assumed 
> 'CODE_VERSION' in C:\xampp\htdocs\racktables\wwwroot\inc\init.php on 
> line 48
>
> This Racktables installation seems to be just upgraded to version 
> CODE_VERSION, while the database version is 0.20.8.
> No user will be either authenticated or shown any page until the 
> upgrade is finished.
> Follow this link and authenticate as administrator to finish the upgrade.

I installed XAMPP and reproduced the error.  The problem is that 1) Windows is 
case-insensitive, and 2) XAMPP includes PEAR modules whose filenames conflict 
with RackTables filenames.

C:\xampp\php\pear contains Config.php.  RackTables' init.php file has this line:
require_once 'config.php'

Because 'Config.php' gets loaded first, 'config.php' gets skipped.

A quick fix is to edit C:\xampp\php\php.ini and comment out the "include_path=" 
line with a semicolon.  If you don't have permission to modify that file, you 
could also add this as the second line of RackTables' index.php file:
set_include_path (__DIR__);

As a long-term fix, RT devs may want to change all require directives to use 
full paths.

require_once __DIR__ . '/config.php';
    instead of
require_once 'config.php';

--
Aaron Dummer

Other related posts: