<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Php - 分类 - 研发日志 · R&amp;D Log</title><link>https://rd163.visword.com/categories/php/</link><description>Php - 分类 - 研发日志 · R&amp;D Log</description><generator>Hugo -- gohugo.io</generator><language>zh-CN</language><managingEditor>whutluohui@gmail.com (小智晖)</managingEditor><webMaster>whutluohui@gmail.com (小智晖)</webMaster><copyright>本作品采用知识共享署名-非商业性使用 4.0 国际许可协议进行许可。</copyright><lastBuildDate>Sun, 12 Jan 2025 00:00:00 +0800</lastBuildDate><atom:link href="https://rd163.visword.com/categories/php/" rel="self" type="application/rss+xml"/><item><title>Nginx + PHP-FPM 部署与调优</title><link>https://rd163.visword.com/posts/php-nginx/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/php-nginx/</guid><description><![CDATA[<p>PHP-FPM(FastCGI Process Manager)是 PHP 官方维护的 FastCGI 协议实现，自 <strong>PHP 5.3.3(2010 年 7 月发布)</strong> 起合并进 PHP 核心代码库，在此之前它只是 Andréi Nigmatulin 维护的一个独立补丁。合并后，编译 PHP 时加上 <code>--enable-fpm</code> 即可获得 <code>php-fpm</code> 二进制，SAPI(Server API)名称为 <code>fpm-fcgi</code>。源码位于 PHP 主仓库的 <code>sapi/fpm/</code> 目录，入口文件为 <a href="https://github.com/php/php-src/blob/master/sapi/fpm/fpm/fpm_main.c" target="_blank" rel="noopener noreferrer"><code>sapi/fpm/fpm/fpm_main.c</code></a>。</p>]]></description></item><item><title>PHP + Nginx 部署模式总览</title><link>https://rd163.visword.com/posts/php-nginx-deploy/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/php-nginx-deploy/</guid><description>&lt;p>在生产环境部署 PHP 应用时，Nginx 与 PHP-FPM(FastCGI Process Manager)的组合是最主流的方案。PHP-FPM 自 PHP 5.3.3 起就已经合并进 PHP 核心代码库(源码位于 &lt;code>sapi/fpm/&lt;/code>),通过 FastCGI 协议与 Web 服务器通信，负责管理 worker 进程池来执行 PHP 脚本。&lt;/p></description></item><item><title>PHP 与 Golang 协同：用 RoadRunner 给 PHP 应用换一颗 Go 的心脏</title><link>https://rd163.visword.com/posts/php-with-golang/</link><pubDate>Sun, 12 Jan 2025 00:00:00 +0800</pubDate><author><name>小智晖</name></author><guid>https://rd163.visword.com/posts/php-with-golang/</guid><description>&lt;p>PHP 与 Go 的结合并不少见，但在工程实践中，最常见的合作形态并不是「把 PHP 代码改写成 Go」,而是让 Go 接管网络层与进程管理，让 PHP 专注于业务逻辑。&lt;strong>RoadRunner&lt;/strong> 正是这种思路的代表性项目：它用 Go 写了一个高性能的应用服务器（application server）,把 PHP 进程作为长驻 worker(常驻工作进程)调度起来，从而绕开了传统 PHP-FPM 在每个请求上重复引导框架的开销。&lt;/p></description></item></channel></rss>