PHPackages                             phpfastcgi/fastcgi-daemon - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. phpfastcgi/fastcgi-daemon

ActiveLibrary[DevOps &amp; Deployment](/categories/devops)

phpfastcgi/fastcgi-daemon
=========================

A FastCGI daemon written in PHP

v0.11.0(7y ago)32911.4k16[4 issues](https://github.com/PHPFastCGI/FastCGIDaemon/issues)[1 PRs](https://github.com/PHPFastCGI/FastCGIDaemon/pulls)4MITPHPPHP ^7.1CI failing

Since May 19Pushed 7y ago17 watchersCompare

[ Source](https://github.com/PHPFastCGI/FastCGIDaemon)[ Packagist](https://packagist.org/packages/phpfastcgi/fastcgi-daemon)[ RSS](/packages/phpfastcgi-fastcgi-daemon/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (19)Used By (4)

FastCGI Daemon
==============

[](#fastcgi-daemon)

[![Latest Stable Version](https://camo.githubusercontent.com/07094d6c79c08beaf67b43fc671164506d79f4da59776242b51711bfed2a335e/68747470733a2f2f706f7365722e707567782e6f72672f706870666173746367692f666173746367692d6461656d6f6e2f762f737461626c65)](https://packagist.org/packages/phpfastcgi/fastcgi-daemon)[![Build Status](https://camo.githubusercontent.com/06addfa1df305904c69c4776f4a0f06b57059c3fd197349f97845048a83b919b/68747470733a2f2f7472617669732d63692e6f72672f504850466173744347492f466173744347494461656d6f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/PHPFastCGI/FastCGIDaemon)[![Coverage Status](https://camo.githubusercontent.com/45379b1b38ff6e4dbe22916627ab7d33bed59d278cb56ab78b83aa867cb1aaaa/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f504850466173744347492f466173744347494461656d6f6e2f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/PHPFastCGI/FastCGIDaemon?branch=master)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/a243763e03344532550a1cca150fdfe6d9b83a1db352104a4a2a6aa961e85099/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f504850466173744347492f466173744347494461656d6f6e2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/PHPFastCGI/FastCGIDaemon/?branch=master)[![Total Downloads](https://camo.githubusercontent.com/26013fdd95595fe7b21f2ba2ce22792c9543858a7a0ff87cad69e289ead68eba/68747470733a2f2f706f7365722e707567782e6f72672f706870666173746367692f666173746367692d6461656d6f6e2f646f776e6c6f616473)](https://packagist.org/packages/phpfastcgi/fastcgi-daemon)

A FastCGI daemon written in PHP. Visit the [project website](http://phpfastcgi.github.io/) for more documentation and guides.

Check out the [project performance benchmarks](http://phpfastcgi.github.io/general/2015/08/24/phpfastcgi-benchmarks-symfony-silex-slim.html) to see how we got a "Hello, World!" Slim application to handle 5,500 rq/s.

Introduction
------------

[](#introduction)

Using this daemon, applications can stay alive between HTTP requests whilst operating behind the protection of a FastCGI enabled web server.

The daemon requires a handler to be defined that accepts request objects and returns PSR-7 or HttpFoundation responses.

The [Speedfony Bundle](https://github.com/PHPFastCGI/SpeedfonyBundle) integrates this daemon with the Symfony2 framework. The [Slim Adapter](https://github.com/PHPFastCGI/SlimAdapter) integrates this daemon with the Slim v3 framework. The [Silex Adapter](https://github.com/PHPFastCGI/SilexAdapter) integrates this daemon with the Silex framework.

There is also an un-official [ZF2 Adapter](https://github.com/Okeanrst/FastCGIZF2Adapter) that integrates this daemon with Zend Framework 2.

Current Status
--------------

[](#current-status)

This project is currently in early stages of development and not considered stable.

Contributions and suggestions are welcome.

Usage
-----

[](#usage)

Below is an example of a simple 'Hello, World!' FastCGI application. There are 3 examples. One with the PHPFastCGI request, one with Symfony HTTP Foundation request and one with PSR-7 Request.

### PHPFastCGI request

[](#phpfastcgi-request)

Using the pure PHPFastCGI is the fastest method since it does not involve any converting of requests.

We need a PSR-7 implementation's response object.

```
composer require composer require zendframework/zend-diactoros

```

```
