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...
Magnific asked 5/5, 2015 at 5:41

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.
Amarette asked 1/3, 2012 at 20:7

6

I have MAMP and I need to enable -pcntl on my current MAMP installation. How can I do so?
Timmerman asked 8/3, 2011 at 8:53

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.
Noway asked 29/1, 2018 at 17:55

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...
Criseyde asked 17/7, 2016 at 8:50

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...
Vi asked 25/4, 2016 at 16:24

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(...
Megrim asked 26/1, 2016 at 23:40

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...
Trillium asked 31/12, 2012 at 0:20

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...
Submersible asked 14/11, 2014 at 16:11

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...
Ribbonwood asked 17/9, 2014 at 13:36

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. ...
Harvard asked 28/4, 2013 at 12:28

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...
Fulminate asked 28/7, 2013 at 9:17

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...
Smegma asked 24/5, 2013 at 9:45

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...
Grass asked 5/5, 2013 at 11:0

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...
Torsibility asked 26/4, 2013 at 14:6

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...
Haroldson asked 2/4, 2013 at 17:30

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...
Cellar asked 18/5, 2010 at 23:48

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?
Polyvalent asked 3/6, 2012 at 14:49

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();...
Godforsaken asked 31/8, 2012 at 11:50

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...
Unlovely asked 26/7, 2011 at 15:5

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

© 2022 - 2024 — McMap. All rights reserved.