Gossamer Forum
Home : Products : Links 2.0 : Discussions :

fatal error: invalid date format

Quote Reply
fatal error: invalid date format
My programars are not here and I only know a little more than most please help me find this problem ;)

We have just had the server rebuilt and is was working ok before then, all other cgi are working and I run the same program on the same server and it does not have the below problem.

Any idea's you Internet Gods?


Gathering Category and Link information . . .


CGI ERROR
==========================================
Error Message : fatal error: invalid date format: 1-Jan-00 - parsed as (day: 1, month: 0, year: -1900). Reason: Can't handle date (0, 0, 0, 1, 0, -1900) at /usr/wwwroot/ddehek/newzealandnz//cgi-bin/admin/links.cfg line 178

Script Location : /usr/wwwroot/ddehek/newzealandnz//cgi-bin/admin/nph-build.cgi
Perl Version : 5.006001

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
AUTH_TYPE : Basic
DOCUMENT_ROOT : /usr/wwwroot/ddehek/newzealandnz/
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/msword, application/vnd.ms-powerpoint, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: en-nz
HTTP_CONNECTION : Keep-Alive
HTTP_HOST : www.newzealandnz.co.nz
HTTP_REFERER : http://www.newzealandnz.co.nz/cgi-bin/admin/admin.cgi?display=navigation
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 6.0b; Windows 98)
PATH : /usr/local/sbin:/sbin:/bin:/usr/sbin:/usr/bin
QUERY_STRING :
REMOTE_ADDR : 203.167.133.243
REMOTE_HOST : 203.167.133.243
REMOTE_PORT : 1045
REMOTE_USER : remote
REQUEST_METHOD : GET
REQUEST_URI : /cgi-bin/admin/nph-build.cgi
SCRIPT_FILENAME : /usr/wwwroot/ddehek/newzealandnz//cgi-bin/admin/nph-build.cgi
SCRIPT_NAME : /cgi-bin/admin/nph-build.cgi
SERVER_ADMIN : remote@xtra.co.nz
SERVER_NAME : www.newzealandnz.co.nz
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.2.6


Quote Reply
Re: fatal error: invalid date format In reply to
Most likely due to the Perl upgrade to PERL 5.006...

Codes have been posted to fix this error in the Links 2.0 Installation-UNIX Forum...search for:

Perl 5.006

Regards,

Eliot Lee
Quote Reply
Re: fatal error: invalid date format In reply to
I searched and searched and could not find the Peal Code to fix this problem and did find the below but it stops the NEW icons and the NEW Site pages loading and you please point me to the URL of the fix to do.

I did read somewhere my moving the admin dir to it own dir it fix this problem if I do need to move what files do I move?

Thank you very much


This is what I tried fix one problem and got 3 more ;)
I have read many posts in here about the nph-build.cgi script returning the error fatal error: invalid date format... yadayada... but nobody has yet posted a good solution to the problem. I had the same problem occur and here is the skinny....

The basic problem has been established... it is that when you (or your server host) upgrades to Perl version 5.006 it does not correctly render the Time::Local subroutine which is called from various scripts in links 2.0.

Strangly enough the solution is absurdely simple. In your links.cfg script you would make one alteration... you simply add a 1 to the end of the $year

So for example on (my line 292) in links.cfg It would look like:
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year1);

instead of:
$time = &Time::Local::timelocal(0,0,0, $day, $months{$mon}, $year);

Just do this and it should solve all of your problems.

It's not really y2k related, but more y2k.1 related problem. :)

The year is sent as a three digit variable in the new Perl configuration. So unfortunately, you will actually have to change this each year... i.e. next year to a 2... but it's the best I could come up with for now!
Good luck.


Quote Reply
Re: fatal error: invalid date format In reply to
Looks like you found the thread I was thinking of...

bye bye!

Regards,

Eliot Lee
Quote Reply
Re: fatal error: invalid date format In reply to
But it does not fix the problem

Quote Reply
Re: fatal error: invalid date format In reply to
Delete the Local.pm file, then re-install all the Perl library files, or simply copy the Local.pm from the ZIP file of the Perl package your downloaded and put it in the Perl/lib/Time folder.

Regards,

Eliot Lee
Quote Reply
Re: fatal error: invalid date format In reply to
So I need to get my ISP to do this? is there not other way? or can you tell me how come the other program (same) I run does not have the problem? the only differents is it not sitting on the same part of the server.

Quote Reply
Re: fatal error: invalid date format In reply to
YES, although I thought you said that you have your own server...guess not!

Contact your ISP and ask them to either re-install Perl 5.006 OR revert back to Perl 5.0053, which is WAY more stable.

Regards,

Eliot Lee
Quote Reply
Re: fatal error: invalid date format In reply to
I got this from my ISP

Hmmmm, these files are already there.

At 17:09 3/07/01 +1200, you wrote:


Ok this is what the programer thinks will fix my new problem.

Delete the Local.pm file, then re-install all the Perl library files, or simply copy the Local.pm from the ZIP file of the Perl package your downloaded and put it in the Perl/lib/Time folder.


Quote Reply
Re: fatal error: invalid date format In reply to
No luck with any ideas? sorry I am not a tech head but a ready would be greatful if you could help or email me someone who can help.

Quote Reply
Re: [Stealth] fatal error: invalid date format In reply to
My server is running 5.6.1 They reinstalled the Local.pm on the server, but it didn't help...:( For now I guess all I can do is add a 1 to the year.