That's what I was afraid of.
My web host (totalchoicehosting) doesn't have pcntl compiled in either, so I'm sort of stuck.


Isn't there any other way to fork a process? PHP doesn't have thread support? Why isn't pcntl enabled by default?
Surely the Windows compatibility isn't an issue, because pcntl could default to enabled in linux but disabled in windows.



I'll tell you what I'm trying to do, in case there's another way to do it: I have a logging script which does a gethostbyaddr to obtain the hostname of the visitor to my site. But gethostbyaddr can take long or time out on some IP's, so I want to fork it so that the original script can terminate and not prevent the webpage from loading.
I could run a background job which periodically does the gethostbyaddr on the IP's stored on disk, but that's sort of a hack, and is more complicated than if I could fork.


-John

On Wed, 26 Jan 2005, Ben Ramsey wrote:

John Davin wrote:
The manual says pcntl is present in php >= 4.1.0. I have 4.3.10, just the standard installation included on fedora core 3.

Why wouldn't pcntl be working? Is there any other way for me to fork a process or thread?

Take a look at http://www.php.net/pcntl.

If you're using the standard installation of PHP on FC3, then it won't have pcntl enabled with --enable-pcntl because it's not enabled by default. You will have to recompiled PHP with this feature.

--
Ben Ramsey
Zend Certified Engineer
http://benramsey.com

-- PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to