{"id":44610978,"url":"https://github.com/pigochu/wphpfpm","last_synced_at":"2026-02-18T10:10:05.264Z","repository":{"id":54189237,"uuid":"205077283","full_name":"pigochu/wphpfpm","owner":"pigochu","description":"PHP FastCGI Manager for Windows","archived":false,"fork":false,"pushed_at":"2021-03-04T10:15:41.000Z","size":99,"stargazers_count":13,"open_issues_count":3,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2023-08-04T14:21:51.654Z","etag":null,"topics":["golang","php-cgi","php-fpm"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pigochu.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-29T04:00:59.000Z","updated_at":"2023-06-02T08:29:39.000Z","dependencies_parsed_at":"2022-08-13T08:41:02.153Z","dependency_job_id":null,"html_url":"https://github.com/pigochu/wphpfpm","commit_stats":null,"previous_names":[],"tags_count":0,"template":null,"template_full_name":null,"purl":"pkg:github/pigochu/wphpfpm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigochu%2Fwphpfpm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigochu%2Fwphpfpm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigochu%2Fwphpfpm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigochu%2Fwphpfpm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pigochu","download_url":"https://codeload.github.com/pigochu/wphpfpm/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pigochu%2Fwphpfpm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29575401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T08:38:15.585Z","status":"ssl_error","status_checked_at":"2026-02-18T08:38:14.917Z","response_time":162,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["golang","php-cgi","php-fpm"],"created_at":"2026-02-14T12:00:22.761Z","updated_at":"2026-02-18T10:10:05.259Z","avatar_url":"https://github.com/pigochu.png","language":"Go","funding_links":[],"categories":["Go"],"sub_categories":[],"readme":"# wphpfpm (PHP FastCGI Manager for windows) #\n\nwphpfpm is my first go-lang project for manage php-cgi on Windows.\n\nSince php-cgi can only serve one client at one time, unless you use apache's mod_fcgid, it's really hard to manage.\n\nSo I wrote it for myself, mainly because using caddy to test php can only start one php-cgi process. It is too inhuman, and when I want to change the php settings and want to restart php-cgi, I have to manually kill php-cgi.\n\nFor performance, please refer to  [BENCHMARK.md](./BENCHMARK.md)\n\n\n\n## Features ##\n\n1. wphpfpm is a standalone service, similar to php-fpm under Linux\n2. You can create multiple instances for multiple version php-cgi\n3. php-cgi can set the maximum number of process\n4. wphpfpm can be a windows service or running on console mode.\n5. JSON format configuration file\n\nPlease download GO  [GO SDK](https://golang.org/)  (version 1.12+) and execute the following command to get wphpfpm.exe\n\n~~~bash\ngo build\n~~~\n\nOr refer to [caddy-wphpfpm-example.md](./caddy-wphpfpm-example.md) for a simple setup of caddy + wphpfpm.\n\n## Configure file  ##\n\nThe following is a json example. The source code [config-sample.json](./config-sample.json) can be download and modify it for your environment.\n\n```json\n{\n    \"LogLevel\" : \"ERROR\",\n    \"Logger\": {\n        \"FileName\": \"C:\\\\wphpfpm\\\\wphpfpm.log\",\n        \"MaxSize\":    10,\n        \"MaxBackups\": 4,\n        \"MaxAge\":     7,\n        \"Compress\":   true,\n        \"Note\": \"If you don't need Logger, you can remove the entire Logger section, MaxSize is the unit of MB, MaxAge is the unit of days, this example has 7 days of content per log.\"\n    },\n    \"Instances\" : [\n        {\n            \"Bind\" : \"127.0.0.1:8000\",\n            \"ExecPath\": \"C:\\\\PHP7\\\\php-cgi.exe\",\n            \"Args\" : [],\n            \"Env\": [\n                \"PHPRC=C:\\\\PHP7\",\n                \"PHP_FCGI_MAX_REQUESTS=5000\" ,\n                \"PHP_INI_SCAN_DIR=c:\\\\php7\\\\conf.d\"\n            ],\n            \"MaxProcesses\" : 4,\n            \"MaxRequestsPerProcess\": 500\n        } ,\n\n        {\n            \"Bind\" : \"127.0.0.1:8001\",\n            \"ExecPath\": \"C:\\\\PHP5\\\\php-cgi.exe\",\n            \"Args\" : [],\n            \"Env\": [\n                \"PHPRC=C:\\\\PHP5\",\n                \"PHP_FCGI_MAX_REQUESTS=5000\" ,\n                \"PHP_INI_SCAN_DIR=c:\\\\php5\\\\conf.d\"\n            ],\n            \"MaxProcesses\" : 2,\n            \"MaxRequestsPerProcess\": 500\n        }\n    ]\n}\n```\n\n- LogLevel : According to the level, the default is ERROR\n  * PANIC\n  * FATAL\n  * ERROR\n  * WARN\n  * INFO\n  * DEBUG\n  * TRACE\n- Logger : You can define the Log output to the file. If you don't need it, you can remove it. The output will be Console (stderr).\n- Instances : Define how many kinds of php-cgi to start, this can be used as multiple versions\n\n  - Bind : Define what IP and Port to use for this instance. If multiple versions are required, different Instances must be used with different Ports.\n\n  - ExecPath : php-cgi real  path.\n\n  - Args : You can add parameters for execute php-cgi.exe, note that you can't use  -b  parameters\n  - Env : Additional environmental variables\n  - MaxProcesses : This directive sets the maximum number of php-cgi processes which can be active at one time.\n  - MaxRequestsPerProcess : Each php-cgi  process trip can handle up to several requests. This value must be the same or less than Env's environment variable PHP_FCGI_MAX_REQUESTS.\n- Note : This field has no effect, just for comment\n\n\n\n## Usage ##\n\n### Run in command line mode (console mode) ###\n\n```\nwphpfpm run --conf=config.json\n```\n\n### Install as Windows Service ###\n\n```\nwphpfpm install --conf=c:\\wphpfpm\\config.json\n```\n\nNote that when install as  a Windows Service, you must use administrator privileges to install.\n\n### Remove wphpfpm service ###\n\n```\nwphpfpm uninstall\n```\n\n\n\n### Start and stop wphpfpm service ###\n\n```\nwphpfpm start\nwphpfpm stop\n```\n\nAlternatively, the service under Windows Control Panel\\All Control Panel Items\\Administrative Tools\\Services can also be started or stopped PHP FastCGI Manager for windows\n\n## Author\n\n- Pigo Chu \u003cpigochu@gmail.com\u003e\n\n- Web Site https://www.pigo.idv.tw\n\n## Resouces ##\n\n- Windows Service Control : https://github.com/chai2010/winsvc\n- Command Line parser  : https://gopkg.in/alecthomas/kingpin.v2\n- Windows Named Pipe : https://github.com/natefinch/npipe\n- Article (https://blog.csdn.net/small_qch/article/details/19562661)\n- Log/LogLevel : Logrus (https://github.com/sirupsen/logrus)\n- Log Rotate : lumberjack (https://github.com/natefinch/lumberjack)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpigochu%2Fwphpfpm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpigochu%2Fwphpfpm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpigochu%2Fwphpfpm/lists"}