[pmwiki-devel] Register shutdown...

The Editor editor at fast.st
Fri Nov 3 15:30:44 CST 2006


On 11/3/06, Crisses <crisses at kinhost.org> wrote:
> Since I don't know what ZAPsavepage() does & requires, I don't know
> if the problem is the register_shutdown_function or not.

It's a regular ZAP function that works fine elsewhere.  Should have
the input correct.  But regardless the problem again is that the page
hands for 20 seconds till it wakes from its sleep.  If it worked as it
should, the page would reload first, and then the 20 seconds begin.
So the problem must be elsewhere.  Maybe it is something with how
windows handles register_shutdown_function, which is supposed to be
problematic.

> I went to the program code I thought I'd used
> register_shutdown_function in to grab a working example for you --
> turns out it had caused problems because UpdatePage was taking far
> too long, so I had turned it off to debug (I was getting a hung
> process on my laptop -- I'm glad I never made it live!  I'd have a
> mad ISP...).  I got everything working smoothly and forgot to
> reinstate it. :P  So everything is working smoothly without
> register_shutdown_function on my program.  I had fixed UpdatePage
> hanging by temporarily resetting:
>
>        $EditFunctions = array( 'ReplaceOnSave','SaveAttributes',
> 'PostPage','AutoCreateTargets');
>
> -- in other words I removed a bunch of functions from the queue of
> items that UpdatePage was running when it created a page (most
> noticably the ones that update RecentChanges pages and check for
> NotifyPosts).  Then forgot to make it write the pages AFTER the
> browser refresh.  Page creation happens so much faster now, I didn't
> notice that I'd forgotten to put it in the background again.  The
> downside is that people can add 100s or 1000s of pages using this
> function, and there's no RecentChanges logged.

Can you explain more if this is something I could use.  I'm talking
about a way to processes form submissions, reloads the page,
disconnect from that page, and then run a separate function without
tying up the browser.  If you did it, how?

Else, as for cron, how do I figure the path I'm supposed to enter?
Again, relative to what/where?  I really thought this was going to be
fairly easy...  But more learning!

Cheers,
Caveman



More information about the pmwiki-devel mailing list