View Issue Details

IDProjectCategoryView StatusLast Update
1981RackTablesdefaultpublic2020-08-13 00:15
Reportermlaven Assigned To 
Status acknowledgedResolutionopen 
Product Version0.21.4 
Summary1981: Can not save any date ate expiration date field.
DescriptionHi all!

First of all: Racktables is a great product!

I ran into a problem that I can't get solved.
First, my setup: I'm running Racktables 0.21.4 on a Windows 2016 IIS server, with PHP and mySQL.
Everything is working as i should, but only I cannot save any date at the S/W of H/W expiration fields. I tried almost every type of date format (%d-%m-%Y, and reversed, and / instead of -). Nothing will work.

Everytime I put a date in the box and try to save the object I get a HTTP-500 error. All other info I can save without any problem.

Just the date is a problem...

Please help!!

The Netherlands.
Steps To ReproduceSee description.
TagsNo tags attached.




2020-08-12 21:13

reporter   ~0004147

By the way:
This is the PHP error I get when trying to save a date:

[12-Aug-2020 21:03:24 Europe/Amsterdam] PHP Fatal error: Uncaught Error: Call to undefined function strptime() in C:\inetpub\Racktables\wwwroot\inc\functions.php:6381
Stack trace:
#0 C:\inetpub\Racktables\wwwroot\inc\functions.php(431): timestampFromDatetimestr()
#1 C:\inetpub\Racktables\wwwroot\inc\ophandlers.php(1374): genericAssertion()
#2 C:\inetpub\Racktables\wwwroot\inc\ophandlers.php(1312): updateObjectAttributes()
#3 C:\inetpub\Racktables\wwwroot\index.php(238): updateObject()
#4 {main}
  thrown in C:\inetpub\Racktables\wwwroot\inc\functions.php on line 6381


2020-08-13 00:15

administrator   ~0004149

Thank you for the bug report. According to PHP documentation, strptime() is a part of PHP core since 5.1.0, but it is not available on Windows. Before switching to strptime() in 2013 RackTables used a different date parsing function and it didn't work well (see the comment in git commit 2a943f8). Before switching to strptime() I had made a comparison of date and time functions and picked the one that worked well, had a good reverse function and did not depend on PHP >= 5.3. Although Windows compatibility was and is not a goal, I accept that another good function may be available now (RackTables now requires PHP >= 7.0), and that in that case the other function might also fix this Windows-specific issue. But before making any changes all edge cases would need to be considered because every RackTables user has date+time data in the database and its processing must not break. In other words, if this problem ever gets fixed, it will take a long time, so if you need a quick solution and want to avoid as many edge cases as possible, please run RackTables on a Linux server/VM with Apache httpd.

Issue History

Date Modified Username Field Change
2020-08-12 20:45 mlaven New Issue
2020-08-12 21:13 mlaven Note Added: 0004147
2020-08-13 00:15 infrastation Severity feature => major
2020-08-13 00:15 infrastation Status new => acknowledged
2020-08-13 00:15 infrastation OS => Windows
2020-08-13 00:15 infrastation Note Added: 0004149