Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-08-04 15:01:35
- .organic
- New Member
- From: Freiburg, De
- Registered: 2006-08-04
- Posts: 3
'FIXME:convert mysql-timestamps to unixtimestamps' and 'Last Modified'
Hi
I am filling myself [i]so stupid[/i], but I have no idea about Last Modified header. In the file [i]publish.php[/i] I decomment
[code]
if($send_lastmod) { $last = gmdate(“D, d M Y H:i:s \G\M\T”,$lastmod); header(“Last-Modified: $last”);
$hims = serverset(‘HTTP_IF_MODIFIED_SINCE’); if ($hims == $last) { header(“HTTP/1.1 304 Not Modified”); exit; } }
[/code]
but all I receive is [b]Last-Modified: Thu, 01 Jan 1970 00:33:26 GMT[/b]
I am not so old!
Search through the forum – without any explanation about this.
1) What is good solution for such a option? (To have unique adequate Last Modified header for each individual page, not for the whole site)
2) Is it possible use <txp:posted format=”%a, %d %B %Y %I:%m:%S” /> tag in page template for server headers formation?
Offline
Re: 'FIXME:convert mysql-timestamps to unixtimestamps' and 'Last Modified'
FIXME = fix me. That piece of code is asking to be fixed, because it is broken.
If somebody feels like fixing it, patches are welcome to the txp-dev list. Thanks.
Offline
#3 2006-08-04 15:38:42
- .organic
- New Member
- From: Freiburg, De
- Registered: 2006-08-04
- Posts: 3
Re: 'FIXME:convert mysql-timestamps to unixtimestamps' and 'Last Modified'
And what is normal way to solve unique and adequate ‘Last modified’ header question? Thanks a lot!
Offline
#4 2006-08-06 15:07:40
- .organic
- New Member
- From: Freiburg, De
- Registered: 2006-08-04
- Posts: 3
Re: 'FIXME:convert mysql-timestamps to unixtimestamps' and 'Last Modified'
hallo?!
is somebody interested by their web-site headers? I need Last modified!
Offline
Re: 'FIXME:convert mysql-timestamps to unixtimestamps' and 'Last Modified'
WHich part of “That piece of code is asking to be fixed, because it is broken.” is unclear to you. If we had a fix for it, it wouldn’t be broken, would it? ;) If you are worried about feeds, those are handled seperately, and 304 is working properly for them.
Alex is working on the issue in the current dev-branch which will turn into a maintenance release in the next couple of weeks.
In the meantime you can use a caching plugin, like zem_cache (easier to install and use), or asy_jpcache (less flexible, but faster and supports 304).
Offline
#6 2006-08-06 23:02:02
- zem
- Developer Emeritus

- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Offline