icon Get the most out of Surmunity, read our tips here! Need an interesting blog to read? You've got to read the Surpass Blog! | Welcome! Please register to access all of our features.
Old February 19th, 2006, 9:12 PM   #1 (permalink)
Registered User
Fresh Surpasser
 
Joined in Jan 2004
13 posts
Gave thanks: 0
Thanked 0 times
Question Unix Date Command?

Hello,

I am using a guestbook from Matt's Script Archive. Everything works well, except the date does not show up for user entries. I want to make sure I have set the Unix Date command location correctly. Does anyone know how to do that?

Matt's help page says:
"Another possible problem is that you are using the default cgi-bin on an NCSA server or another web server that comes with a pre-made cgi script called 'date'. This can cause problems if you do not set your script to point to the unix date command. To find out where that is, type this at your unix prompt:

which date

That should give you a path to the date command."

And the actual code that's not working currently looks like this:



Code:
$date_command = "/usr/bin/date";
...
$date = `$date_command +"%A, %B %d, %Y at %T (%Z)"`; chop($date);
$shortdate = `$date_command +"%D %T %Z"`; chop($shortdate);
...
print GUEST " - $date<hr>\n\n";
(The ... means there is other code there)

Thanks!
jmania is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old February 20th, 2006, 9:17 AM   #2 (permalink)
01101100
Super #1
 
markscns's Avatar
 
Joined in Jan 2006
Lives in West Michigan
Hosted on SH92
1,602 posts
Gave thanks: 49
Thanked 112 times
Re: Unix Date Command?

This should help, from the server I am on here:

xxxxxxxx [~]# type date
date is /bin/date

Your path should be:

/bin/date
markscns is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On