import{_ase,caso,oasl,a1asa}from"./chunks/framework.gjrnbxUT.js";constu=JSON.parse('{"title":"扩展注意事项","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/extension-notes.md","filePath":"zh/guide/extension-notes.md"}'),s={name:"zh/guide/extension-notes.md"},i=a('<h1id="扩展注意事项"tabindex="-1">扩展注意事项<aclass="header-anchor"href="#扩展注意事项"aria-label="Permalink to "扩展注意事项""></a></h1><p>因为是静态编译,扩展不会100%完美编译,而且不同扩展对PHP、环境都有不同的要求,这里将一一列举。</p><h2id="curl"tabindex="-1">curl<aclass="header-anchor"href="#curl"aria-label="Permalinkto"curl""></a></h2><p>使用curl请求HTTPS时,可能存在<code>error:80000002:systemlibrary::Nosuchfileordirectory</code>错误,解决办法详见<ahref="./../faq/#无法使用-ssl">FAQ-无法使用ssl</a>。</p><h2id="phpmicro"tabindex="-1">phpmicro<aclass="header-anchor"href="#phpmicro"aria-label="Permalinkto"phpmicro""></a></h2><ol><li>phpmicroSAPI仅支持PHP>=8.0版本。</li></ol><h2id="swoole"tabindex="-1">swoole<aclass="header-anchor"href="#swoole"aria-label="Permalinkto"swoole""></a></h2><ol><li>swoole>=5.0版本仅支持PHP>=8.0版本。</li><li>swoole目前不支持PHP8.0版本curl的hook(后续有可能会修复)。</li><li>编译时只包含<code>swoole</code>扩展时不会完整开启支持的Swoole数据库协程hook,如需使用请加入对应的<code>swoole-hook-xxx</code>扩展。</li><li>swoole在部分扩展组合下可能出现<code>zend_mm_heapcorrupted</code>问题,暂未找到是什么原因导致的。</li></ol><h2id="swoole-hook-pgsql"tabindex="-1">swoole-hook-pgsql<aclass="header-anchor"href="#swoole-hook-pgsql"aria-label="Permalinkto"swoole-hook-pgsql""></a></h2><p>swoole-hook-pgsql不是一个扩展,而是Swoole的Hook特性。如果你在编译时添加了<code>swoole,swoole-hook-pgsql</code>,你将启用Swoole的PostgreSQL客户端和<code>pdo_pgsql</code>扩展的协程模式。</p><p>swoole-hook-pgsql与<code>pdo_pgsql</code>扩展冲突。如需使用Swoole和<code>pdo_pgsql</code>,请删除pdo_pgsql扩展,启用<code>swoole</code>和<code>swoole-hook-pgsql</code>即可。该扩展包含了<code>pdo_pgsql</code>的协程环境的实现。</p><p>在macOS系统,<code>pdo_pgsql</code>可能无法正常连接到postgresql服务器,请谨慎使用。</p><h2id="swoole-hook-mysql"tabindex="-1">swoole-hook-mysql<aclass="header-anchor"href="#swoole-hook-mysql"aria-label="Permalinkto"swoole-hook-mysql""></a></h2><p>swoole-hook-mysql不是一个扩展,而是Swoole的Hook特性。如果你在编译时添加了<code>swoole,swoole-hook-mysql</code>,你将启用Swoole的<code>mysqlnd</code>和<code>pdo_mysql</code>的协程模式。</p><h2id="swoole-hook-sqlite"tabindex="-1">swoole-hook-sqlite<aclass="header-anchor"href="#swoole-hook-sqlite"aria-label="Permalinkto"swoole-hook-sqlite""></a></h2><p>swoole-hook-sqlite不是一个扩展,而是Swoole的Hook特性。如果你在编译时添加了<code>swoole,swoole-hook-sqlite</code>,你将启用Swoole的<code>pdo_sqlite</code>的协程模式(Swoole必须为5.1以上)。</p><p>swoole-hook-sqlite与<code>pdo_sqlite</code>扩展冲突。如需使用Swoole和<code>pdo_sqlite</code>,请删除pdo_sqlite扩展,启用<code>swoole</code>和<code>swoole-hook-sqlite</code>即可。该扩展包含了<code>pdo_sqlite</code>的协程环境的实现。</p><h2id="swow"tabindex="-1">swow<aclass="header-anchor"href="#swow"aria-label="Permalinkto"swow""></a></h2><ol><li>swow仅支持PHP>=8.0版本。</li></ol><h2id="imap"tabindex="-1">imap<aclass="header-anchor"href="#imap"aria-label="Permalinkto"imap""></a></h2><ol><li>该扩<EFBFBD>