This is a PHP module for some enhanced functionality.
Currently, it does only one thing: it won't process fastcgi requests when the client has already closed the connection.
Requests are queued by the Linux kernel and placed in a TCP backlog. Once an FPM worker becomes available, it gets the next queued request and starts processing, regardless of the state of the connection with the client.
This module checks if the client is still connected before processing the requests and skips it when the client is already gone.
The behavior can be controlled by the hypernode.kill_gone_requests
setting. To disable the behavior for a specific directory, place a file
called .user.ini in it with the following contents:
hypernode.kill_gone_requests = 0
The buildsystem for this module uses debhelper scripts that are only available for Ubuntu 14.04 (trusty) and later. We still use 12.04 (precise) on Hypernode. If you need to build this module for precies, you need two additional dependencies: php5-dev-5.5-buildscripts and pkg-php-tools from Ubuntu 14.04. Both packages are available in the Hypernode Precise repository. You also need to have the same major version of php5-dev installed as this module will be used with.
You also need dh-php > 0.10, so download here: http://ftp.nl.debian.org/debian/pool/main/d/dh-php/dh-php_0.10_all.deb
Make sure you have a build environment set up for the target system. You can use instructions from the wiki.
Build the package for each phpapi we support! See below:
- Enable the Hypernode repository with the 5.4 component
- export DIST=precise ARCH=amd64
git-pbuilder login --save-after-loginecho "deb http://ubuntu.byte.nl precise main hypernode php54" > /etc/apt/sources.listgit-pbuilder update- Build:
git-buildpackage --git-pbuilder --git-dist=$DIST --git-arch=$ARCH --git-debian-branch=master - Upload:
dput -c dput-php-hypernode.cf --unchecked hypernode-precise-php54 ../php5-hypernode_$(dpkg-parsechangelog --show-field version --count 1)_amd64.changes
- Enable the Hypernode repository with the 5.5 component
- export DIST=precise ARCH=amd64
git-pbuilder login --save-after-loginecho "deb http://ubuntu.byte.nl precise main hypernode php55" > /etc/apt/sources.listgit-pbuilder update- Build:
git-buildpackage --git-pbuilder --git-dist=$DIST --git-arch=$ARCH --git-debian-branch=master - Upload:
dput -c dput-php-hypernode.cf --unchecked hypernode-precise-php55 ../php5-hypernode_$(dpkg-parsechangelog --show-field version --count 1)_amd64.changes
- VERSION=$(date "+%Y%m%d.%H%M%S")
- Update the version in package.xml
ln -s src/ $VERSIONgit-dch --debian-tag="%(version)s" --new-version=$VERSION --debian-branch master --releasegit add package.xml $VERSION debian/changeloggit commit -m "Update changelog for $VERSION release"git tag $VERSIONgit push && git push --tagsgit-buildpackage --git-pbuilder --git-dist=precise --git-arch=amd64 --git-debian-branch=master
phpize
./configure && make
make install (as root)
Place sources in /path/to/php_sources/ext/hypernode.
cd /path/to/php_sources
autoconf
./configure --enable-hypernode
Now just build and install php.