[thelist] Apache ... configuration problem (solved)

George Dillon <> Evolt! evolt at georgedillon.com
Tue Nov 6 17:39:06 CST 2001

> > But I still can't get date to work in the lines:
> >    $date_command="/bin/date"; # STILL NOT WORKING
> >    $logdate= `date +"%Y%m.log"`; # STILL NOT WORKING

> That's because of the /bin/date command - this is for *nix.

Ah!  Got that!  Thanks Arthur.  Just saved me more effort trying to do the
impossible, and it's a relief to know my set-up *is* now working correctly!
Just have to do it another way...

For now I'll just use SSI to store two formatted date values (one for the
log name and one for the page entry) which I *can* easily retrieve in my CGI
script.  When I get round to it, I'll use a reg exp to parse gmtime() within
the CGI.

> the date and flock() functions are both unix specific george :(
> use Date::Manip;
> $date_command = UnixDate(ParseDate('now'),'%B %d, %Y');
> should work better for you on win32.. not sure about the flock() stuff
> lemme know how it goes :)

Thanks Dan :)  Yes, I'd discovered that flock was non windows.  However
adapting a js-style sniff-n-code approach, the following tweak allows me to
code one script to be compatible with both my local Wind-machine and my 'nix

unless ($ENV{'SERVER_ADDR'} =~ /127.0.0/)  { flock LOG, 2; };

So now I'm happy and excitedly embarking on the great Perl adventure!


George Dillon

More information about the thelist mailing list