|
From: Joe Z. <jz...@at...> - 2003-05-16 05:34:05
|
docv wrote:
> My apologies if this is off topic for this list, however I noticed
> that most responses to the forums were older and said to use the mail
> lists. Having only two choices, I choose this one as my question is
> definitely not development.
>
> I have just recently installed Bobs Backup and just getting used to
> it. I am not a PHP programmer but can fumble my way through code if I
> have to to make specific changes. Having said that, I get the
> following message every day (bc of my cron job);
>
> ----Message start----
> /etc/cron.daily/backup.php:
>
> X-Powered-By: PHP/4.1.2
> Set-Cookie: PHPSESSID=e65a78736346bd6bc39851914e??????; path=/
> Expires: Thu, 19 Nov 1981 08:52:00 GMT
> Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
> pre-check=0
> Pragma: no-cache
> Content-type: text/html
> ----Message end----
>
> How do I change the expiration date on the cookie? And why is a cookie
> being set through the cron job?
>
We use the devel mailing list for everything. The cvs mailing list is an
automated mailing that gets sent out when code is checked in to cvs.
Yours is a valid question. I get those messages every day too. Even
though it says "cookie", bobs doesn't use cookies. It uses "sessions" to
store variables across web pages. That's what the PHPSESSID is. Php
sessions create a file with the name of the session id in the /tmp
directory. The file contains all the session variables. I don't know why
it says Set-Cookie, but I guess sessions and cookies must be closely
related.
I think it's the session_start() in /etc/cron.daily/backup.php that
causes the message. I'm not sure it's even needed there. I made a note
to look into it. I'd like to get it out of the logs because it's just
clutter.
I think the date is 1981 because it's really zero. I've seen some
old-style date fields that represent 'number of seconds since 1980' or
thereabouts. The date is meaningless and has no affect on anything bobs
does.
If you run it from the command line, you'll see the same thing:
[root@jupiter bobscustom]# /etc/cron.daily/backup.php
X-Powered-By: PHP/4.2.2
Set-Cookie: PHPSESSID=be82255ef59680420ddf0835624ee33b; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-type: text/html
In fact, you can just run the session start from the command line and
see it, like this:
[root@jupiter bobscustom]# echo '<?php session_start(); ?>' | php
X-Powered-By: PHP/4.2.2
Set-Cookie: PHPSESSID=a992783c093d129b4f1a3395a4696e61; path=/
Expires: Thu, 19 Nov 1981 08:52:00 GMT
Cache-Control: no-store, no-cache, must-revalidate, post-check=0,
pre-check=0
Pragma: no-cache
Content-type: text/html
Joe
|