hi,

> I was thinking of /manual/usernotes/TOPIC.txt, where TOPIC is the subject
in
> question. The contents of those files would just be a serialize array,
> exactly as would be returned by the DB.  My local setup actually does
that,
> but loading those files requires a semi-backdoor into www.php.net, which
I'm
> a bit uncomfortable about.

i'd suggest to make things simpler - just plain pre-generated html with the
notes part. name it after TOPIC and include it in the proper place. the
generator script may run as cron job. there is only one problem - to prevent
rsync client from getting a semi-generated copy. this can be achieved like:

write_content($content,$tmpname);
unlink($path.$topic);
link($path.$topic,$tmpname);
unlink($tmpname);

if $path.$topic is being opened by rsync, after the unlink it will continue
to read the old version. when closed the os will delete the file.
next attempts will result in opening the new version of the file. if rsync
tries to open/find the file between unlink/link the client will lack the
comments until next update...

or better - why not generate html upon comment add and use the html on the
main site also?

> I know, installing a DB on the mirror and loading it with a dump of the
> master is another option, but rsync'd files is just *simpler*.

this is ok but it makes mirror administration harder. also pregenerated
content will require less cpu power...

b.


-- 
PHP Development Mailing List <http://www.php.net/>
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to