Re: Try to find a solution, when restart Apache with PHP Script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jim, i've already look for pcntl... but the support server guys, tell me that they can't install php modules that are not pre-compiled... so, pcntl is not an alternative...

I think you are right... i have to make this script a daemon... but how can i do that with php??... the problem is that this daemon should be started in web interface... see the problem...???

thanks

Jim Lucas escreveu:
Rodolfo De Nadai wrote:
Edward , my best guess is that not IE is holding the connection but the apache user... because the process is related to the apache user... and there's more i can close IE, bacause i use the directive 2> log.log & on the call of system.
Example:
system("php myscript.php 2> log.log &");
This why IE will not wait until the script is finish...

One thing i can't understand is why this child process of the apache user is not killed when i restart apache... that's the real deal...

thanks


This doesn't actually start a new process of PHP seperate from Apache. What you are doing is starting a child process of the child process or the root process of Apache.

What you might want to look in to is http://us2.php.net/manual/en/ref.pcntl.php

This will help you fork your processes, but I think you are still going to run into the same problem even if you fork it within the php process of apache.

What you are probably going to need to do is create your own custom script that will act as a daemon, and replace apache altogether.

This way it is completely separate from apache. It can run on its own port and only answer to you.


--
* Rodolfo De Nadai *
* Analista de Sistema Jr. - Desenvolvimento *

	

	
	*Informática de Municípios Associados S.A.*
Seu governo mais inteligente
rodolfo.denadai@xxxxxxxxxxxxx <mailto:rodolfo.denadai@xxxxxxxxxxxxx> - www.ima.sp.gov.br <http://www.ima.sp.gov.br/> Fone: (19) 3739-6000 / Ramal: 1307
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux