pcntl Questions
4
I am running PHPUnit in Windows and am trying to install PHPUnit via composer.json:
"phpunit/php-invoker": "*"
...with this dependency, but I am getting this error:
phpunit/ph...
3
Solved
My operating system is:Mac OSX 10.11
I'm trying to install Phabricator on my Mac, when I execute the command of
phabricator cpopt$ ./bin/phd start
I got an error:
"ERROR: The PHP extension 'p...
Lockjaw asked 9/12, 2015 at 8:58
4
I'm trying to fork a command line run XAMPP php process using pcntl_fork(). When I run the command below:
$pid = pcntl_fork();
if($pid == -1){
file_put_contents('testlog.log',"\r\nFork Test",FILE...
Incidence asked 30/5, 2013 at 1:29
3
How can I handle CTRL+C in PHP on the command line? Pcntl_* functions do not work in Windows.
6
I have MAMP and I need to enable -pcntl on my current MAMP installation.
How can I do so?
4
Solved
I write simple requirements checking script. It checks all required PHP modules installed. I need to check if pcntl is installed. But this module is accessible only in cgi environment and invisible...
Scrambler asked 11/6, 2013 at 18:7
1
Solved
I've read the docs at https://www.php.net/manual/en/function.pcntl-exec.php and http://php.net/manual/en/function.exec.php but I can't really tell what the actual difference is.
2
Solved
I am working on an application that has periodically-called background processes. One of these was being called by cron, but I am looking for something more robust, so am converting it to run under...
1
Solved
I'm running a PHP daemon with a signal handler to do an orderly cleanup and to reconfigure without stopping:
declare(ticks = 5);
function sig_handler($signo)
{
...
}
pcntl_signal(SIGHUP, 'sig_han...
1
Solved
I'm trying to use pcntl_fork() in php-fpm but it is not available and I get:
Call to undefined function pcntl_fork()
Even though I've out-commented the disable_functions in the php.ini. phpinfo(...
5
Solved
I need help on How to: Enable PCNTL in Ubuntu PHP.
$ mkdir /tmp/phpsource
$ cd /tmp/phpsource
$ wget http://museum.php.net/php5/php-5.3.2.tar.gz
$ tar xvf php-5.3.2.tar.gz
$ cd php-5.3.2/ext/pcn...
1
Solved
I have a simple PHP script that I want to run from the terminal, and be able to process signal codes. The script creates a TCP server and processes connections. Not sure why, but I can't get signal...
1
I have a problem with pcnt_fork
I followed this tutorial for installation
instalation of
pcntl
$ mkdir /tmp/phpsource
$ cd /tmp/phpsource
$ apt-get source php5
$ cd /tmp/phpsource/php5-*/ext/pcn...
2
Solved
I have installed pcntl on my PHP 5.4.6 running on Ubuntu 32-bit 12.10, using this article.
It didn't go smoothly at all because after compiling, when running make test I got the following errors. ...
1
Solved
I have some code like this, and I want to understand how does fork work, but I'm confused with declare(ticks=1).
when I put it in the first line, after the child process finished, the signal handle...
1
Solved
APC works by storing the opcodes from PHP files in shared memory. When PHP is used with a web server (eg Apache) then the shared memory has a long life. When called from the commandline, then the A...
1
Solved
I am using pcntl in order to speed up a quite heave CLI php script, that consists mostly of a class, that is in charge of sending all of the auto-emailing on my application.
My goal is as followin...
1
So, I have this PHP daemon worker that listens to IPC messages.
Weird thing is that the parent process (result from pcntl_fork) leaves a [php] < defunct> process untill the child process is done...
2
Solved
The manual for pcntl_fork() says:
The pcntl_fork() function creates a child process that differs from the parent process only in its PID and PPID.
However, running this simple test surprised m...
2
Solved
With the help from two previous questions, I now have a working HTML scraper that feeds product information into a database. What I am now trying to do is improve efficiently by wrapping my brain a...
1
I'm confused about pcntl_fork in PHP.
I think it does multi-threading, but how does it work and how would I use it in a script?
2
Solved
This is my code, inside index.php (just an example):
$pid = pcntl_fork();
if ($pid == -1) {
die("failed to fork");
} else if ($pid) {
// nothing to do
} else {
putDataIntoWebService();
exit();...
2
Solved
My scripts are getting quite riddled with forked processes in a lot of different functions. Whenever pcntl_fork() is called, all MySQL connections are lost. If I run a query on a PDO MySQL connecti...
1
Lemme begin by giving a basic description of the code I have. I start off with a main parent process (NOTE: I am not showing all functions for simplicity. Let me know if you need me to expand at an...
Quandary asked 12/3, 2012 at 21:54
2
Solved
Many of the component libraries and toolkits I'm familiar with lack CLI-specific libraries (zend, kohana, etc..). Are there any libraries/tools that are designed specifically for developing CLI app...
Mosa asked 15/4, 2010 at 18:1
1 Next >
© 2022 - 2024 — McMap. All rights reserved.