{"id":13828333,"url":"https://github.com/hoaproject/Fastcgi","last_synced_at":"2025-07-09T06:31:37.514Z","repository":{"id":4401606,"uuid":"5538823","full_name":"hoaproject/Fastcgi","owner":"hoaproject","description":"The Hoa\\Fastcgi library.","archived":true,"fork":false,"pushed_at":"2019-04-30T09:27:37.000Z","size":87,"stargazers_count":60,"open_issues_count":2,"forks_count":16,"subscribers_count":14,"default_branch":"master","last_synced_at":"2024-10-30T00:00:42.387Z","etag":null,"topics":["fastcgi","hoa","library","php"],"latest_commit_sha":null,"homepage":"https://hoa-project.net/","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hoaproject.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2012-08-24T10:31:03.000Z","updated_at":"2024-10-18T03:58:25.000Z","dependencies_parsed_at":"2022-09-21T16:42:34.241Z","dependency_job_id":null,"html_url":"https://github.com/hoaproject/Fastcgi","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaproject%2FFastcgi","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaproject%2FFastcgi/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaproject%2FFastcgi/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hoaproject%2FFastcgi/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hoaproject","download_url":"https://codeload.github.com/hoaproject/Fastcgi/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225207878,"owners_count":17438201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["fastcgi","hoa","library","php"],"created_at":"2024-08-04T09:02:41.813Z","updated_at":"2024-11-20T08:30:24.932Z","avatar_url":"https://github.com/hoaproject.png","language":"PHP","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://static.hoa-project.net/Image/Hoa.svg\" alt=\"Hoa\" width=\"250px\" /\u003e\n\u003c/p\u003e\n\n---\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/hoaproject/fastcgi\"\u003e\u003cimg src=\"https://img.shields.io/travis/hoaproject/fastcgi/master.svg\" alt=\"Build status\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://coveralls.io/github/hoaproject/fastcgi?branch=master\"\u003e\u003cimg src=\"https://img.shields.io/coveralls/hoaproject/fastcgi/master.svg\" alt=\"Code coverage\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://packagist.org/packages/hoa/fastcgi\"\u003e\u003cimg src=\"https://img.shields.io/packagist/dt/hoa/fastcgi.svg\" alt=\"Packagist\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://hoa-project.net/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/packagist/l/hoa/fastcgi.svg\" alt=\"License\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  Hoa is a \u003cstrong\u003emodular\u003c/strong\u003e, \u003cstrong\u003eextensible\u003c/strong\u003e and\n  \u003cstrong\u003estructured\u003c/strong\u003e set of PHP libraries.\u003cbr /\u003e\n  Moreover, Hoa aims at being a bridge between industrial and research worlds.\n\u003c/p\u003e\n\n# Hoa\\Fastcgi\n\n[![Help on IRC](https://img.shields.io/badge/help-%23hoaproject-ff0066.svg)](https://webchat.freenode.net/?channels=#hoaproject)\n[![Help on Gitter](https://img.shields.io/badge/help-gitter-ff0066.svg)](https://gitter.im/hoaproject/central)\n[![Documentation](https://img.shields.io/badge/documentation-hack_book-ff0066.svg)](https://central.hoa-project.net/Documentation/Library/Fastcgi)\n[![Board](https://img.shields.io/badge/organisation-board-ff0066.svg)](https://waffle.io/hoaproject/fastcgi)\n\nThis library allows to manipulate the [FastCGI](http://fastcgi.com/) protocol,\nwhich ensures the communication between a HTTP server and an external program\n(such as PHP).\n\n[Learn more](https://central.hoa-project.net/Documentation/Library/Fastcgi).\n\n## Installation\n\nWith [Composer](https://getcomposer.org/), to include this library into\nyour dependencies, you need to\nrequire [`hoa/fastcgi`](https://packagist.org/packages/hoa/fastcgi):\n\n```sh\n$ composer require hoa/fastcgi '~3.0'\n```\n\nFor more installation procedures, please read [the Source\npage](https://hoa-project.net/Source.html).\n\n## Testing\n\nBefore running the test suites, the development dependencies must be installed:\n\n```sh\n$ composer install\n```\n\nThen, to run all the test suites:\n\n```sh\n$ vendor/bin/hoa test:run\n```\n\nFor more information, please read the [contributor\nguide](https://hoa-project.net/Literature/Contributor/Guide.html).\n\n## Quick usage\n\nAs a quick overview, we propose to execute a PHP file through the FastCGI\nprotocol directly.\n\nBefore starting, we need to know that PHP proposes two tools that support\nFastCGI: `php-cgi` and `php-fpm` (for\n[FastCGI Process Manager](http://php.net/install.fpm)). We will use `php-cgi` in\nlocal with the standard port `9000` in TCP:\n\n```sh\n$ php-cgi -b 127.0.0.1:9000\n```\n\nFirst, we write the `Echo.php` file, the one we are likely to execute:\n\n```php\n\u003c?php\n\necho 'foobar';\n```\n\nSecond, we need to open a connexion to the FastCGI server and send a query with\nthe following headers:\n\n  * `SCRIPT_FILENAME` which represents the absolute path to the PHP file to\n    execute;\n  * `REQUEST_METHOD` which represents the HTTP method among `GET`, `POST`,\n    `PUT`, `DELETE` etc.;\n  * `REQUEST_URI` which represents the identifier of the resource we are trying\n    to access.\n\nThus:\n\n```php\n$fastcgi = new Hoa\\Fastcgi\\Responder(\n    new Hoa\\Socket\\Client('tcp://127.0.0.1:9000')\n);\nvar_dump($fastcgi-\u003esend([\n    'REQUEST_METHOD'  =\u003e 'GET',\n    'REQUEST_URI'     =\u003e '/',\n    'SCRIPT_FILENAME' =\u003e __DIR__ . DS . 'Echo.php'\n]));\n// string(6) \"foobar\"\n```\n\nWe can get the headers from the executed file by calling the\n`Hoa\\Fastcgi\\Responder::getResponseHeaders` method.\n\nThis is a good and fast way to execute PHP files (or other programs that support\nFastCGI) without worrying about binary locations, subshell calls, error\nhandling, etc.\n\n## Documentation\n\nThe\n[hack book of `Hoa\\Fastcgi`](https://central.hoa-project.net/Documentation/Library/Fastcgi)\ncontains detailed information about how to use this library and how it works.\n\nTo generate the documentation locally, execute the following commands:\n\n```sh\n$ composer require --dev hoa/devtools\n$ vendor/bin/hoa devtools:documentation --open\n```\n\nMore documentation can be found on the project's website:\n[hoa-project.net](https://hoa-project.net/).\n\n## Getting help\n\nThere are mainly two ways to get help:\n\n  * On the [`#hoaproject`](https://webchat.freenode.net/?channels=#hoaproject)\n    IRC channel,\n  * On the forum at [users.hoa-project.net](https://users.hoa-project.net).\n\n## Contribution\n\nDo you want to contribute? Thanks! A detailed [contributor\nguide](https://hoa-project.net/Literature/Contributor/Guide.html) explains\neverything you need to know.\n\n## License\n\nHoa is under the New BSD License (BSD-3-Clause). Please, see\n[`LICENSE`](https://hoa-project.net/LICENSE) for details.\n","funding_links":[],"categories":["PHP"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoaproject%2FFastcgi","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhoaproject%2FFastcgi","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhoaproject%2FFastcgi/lists"}