View Issue Details

IDProjectCategoryView StatusLast Update
1261RackTablesdefaultpublic2014-09-28 19:00
Reporteradrian.coles Assigned To 
PriorityhighSeverityblockReproducibilityalways
Status acknowledgedResolutionopen 
PlatformXAMMPOSWindowsOS Version2008 R2
Product Version0.20.8 
Summary1261: New instal does not detect code version correctly
Descriptionhttp://racktables/racktables/wwwroot/ produces:

_____________________________________________________________________________
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.
_____________________________________________________________________________

Clicking the link says there is nothing to do, and shows:

Upgrade status
Current status Data version: 0.20.8
Code version: 0.20.8
Summary Come back later.
_____________________________________________________________________________


Init line 45 and 48 seem OK:

if (getConfigVar ('DB_VERSION') != CODE_VERSION)
{
    echo '<p align=justify>This Racktables installation seems to be ' .
        'just upgraded to version ' . CODE_VERSION . ', while the '.

_____________________________________________________________________________

Config.php contains:

define ('CODE_VERSION', '0.20.8');

on line 16
Steps To ReproduceNew install of Racktables 0.20.8 on XAMPP
Additional InformationHappy to provide more info if needed.
TagsNo tags attached.

Activities

infrastation

infrastation

2014-06-27 21:45

administrator   ~0002369

This issue seems to be Windows-specific, it is not clear how it reproduces.

BTW, you could take due credit by troubleshooting it and producing a bugfix.
adrian.coles

adrian.coles

2014-06-27 22:24

reporter   ~0002371

Hi,

Unfortunately I'm not a developer so only know the basics.
I'm thinking that the easiest fix might be to stop the check taking place rather than correct it.
Any ideas on how to do this?
infrastation

infrastation

2014-06-28 07:13

administrator   ~0002373

Without this check things will go wrong. Could you check that init.php is the same as in 0.20.8 tarball?
adrian.coles

adrian.coles

2014-06-30 16:44

reporter   ~0002375

Hi,

just compared these. It looks fine.
:(
infrastation

infrastation

2014-06-30 19:13

administrator   ~0002377

Thank you. It could also help to check if this issue reproduces on another Windows server and is not something specific to current environment only.
adrian.coles

adrian.coles

2014-07-01 00:26

reporter   ~0002379

Is it worth me copying the tar files over the tope of the zip files?
Is there anything else in there that might help trying?
infrastation

infrastation

2014-07-01 06:43

administrator   ~0002381

The tar,gz and zip normally have the same contents.

No other troubleshooting comes to my mind right now.
adrian.coles

adrian.coles

2014-07-02 17:03

reporter   ~0002383

Hi,

I have just reinstalled the server and installed XAMPP and Racktables 0.20.8 from scratch.
Same problem.

:(

Any ideas?
How does the code get the code_version? Where is this variable stored?
infrastation

infrastation

2014-07-02 19:47

administrator   ~0002385

Could you find a Windows expert (for instance, on the racktables-users mailing list) and bring that person to this issue? I don't have necessary experience to troubleshoot it.
adrian.coles

adrian.coles

2014-07-04 09:29

reporter   ~0002387

Can you point me in the right direction?

I'm such a noob
:D
infrastation

infrastation

2014-07-04 09:52

administrator   ~0002389

http://www.freelists.org/list/racktables-users

Please try subscribing and asking more experienced Windows users to help.
adrian.coles

adrian.coles

2014-07-04 09:59

reporter   ~0002391

Thank you
adrian.coles

adrian.coles

2014-07-04 17:11

reporter   ~0002393

Found the solution / problem,:

http://bugs.racktables.org/view.php?id=655

It's alive!
infrastation

infrastation

2014-07-04 19:40

administrator   ~0002395

Let me confirm: you added "." to include_path and it fixed the problem?
adoom42

adoom42

2014-07-05 21:43

administrator   ~0002401

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';
infrastation

infrastation

2014-09-28 19:00

administrator   ~0002515

Commit cab4977 works around a related problem.

Issue History

Date Modified Username Field Change
2014-06-27 09:55 adrian.coles New Issue
2014-06-27 21:45 infrastation Note Added: 0002369
2014-06-27 22:24 adrian.coles Note Added: 0002371
2014-06-28 07:13 infrastation Note Added: 0002373
2014-06-30 16:44 adrian.coles Note Added: 0002375
2014-06-30 19:13 infrastation Note Added: 0002377
2014-07-01 00:26 adrian.coles Note Added: 0002379
2014-07-01 06:43 infrastation Note Added: 0002381
2014-07-02 17:03 adrian.coles Note Added: 0002383
2014-07-02 19:47 infrastation Note Added: 0002385
2014-07-04 09:29 adrian.coles Note Added: 0002387
2014-07-04 09:52 infrastation Note Added: 0002389
2014-07-04 09:59 adrian.coles Note Added: 0002391
2014-07-04 17:11 adrian.coles Note Added: 0002393
2014-07-04 19:40 infrastation Note Added: 0002395
2014-07-05 21:43 adoom42 Note Added: 0002401
2014-07-05 21:43 adoom42 Status new => acknowledged
2014-09-28 19:00 infrastation Note Added: 0002515