pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Upchurch <mike@partner2partner.net>
To: YC Nyon <ycnyon@pd.jaring.my>
To: pgsql-php@postgresql.org
Subject: Re: Spaawn another process
Date: Wed, 06 Nov 2002 13:50:04 -0600
Message-ID: <courier.3DC9726C.000151C4@p2p.partner2partner.net> (raw)

"YC Nyon"  wrote:
>In my PHP page, I need to run a external program to insert map data into
>Postgresql. However, the process is very slow (can be 10 mins). How do I
>return a webpage telling the user that the process is running and permits
>the user to browse the other parts of the web application.
>My idea is to run the "exec();" after the </html> tag. Would that be the
>way?

Use register_shutdown_function() to run a function which exec's the
command.  This turns lose of the browser while the command executes.  Of
course, you will lose the ability to poll the status of the command unless
you build this into your function.

-- 
Michael J. Upchurch
Partner2Partner Communications, LLC



view thread (6+ messages)  latest in thread

Message-ID: <courier.3DC9726C.000151C4@p2p.partner2partner.net>
Permalink:  ../courier.3DC9726C.000151C4@p2p.partner2partner.net/
Also on:    postgresql.org/message-id/courier.3DC9726C.000151C4@p2p.partner2partner.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-php@postgresql.org
  Cc: mike@partner2partner.net, ycnyon@pd.jaring.my
  Subject: Re: Spaawn another process
  In-Reply-To: <courier.3DC9726C.000151C4@p2p.partner2partner.net>
  References: <courier.3DC9726C.000151C4@p2p.partner2partner.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox