deploy: 0fb7784a207f0381a9ecbb92f7560167759f19cf

This commit is contained in:
crazywhalecc 2024-10-18 12:46:39 +00:00
parent 77d7369789
commit 857512736c
59 changed files with 69 additions and 69 deletions

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{_ as e,c as o,o as t,a1 as i}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"FAQ","description":"","frontmatter":{},"headers":[],"relativePath":"en/faq/index.md","filePath":"en/faq/index.md"}'),a={name:"en/faq/index.md"},s=i("",24),n=[s];function r(c,l,d,p,h,u){return t(),o("div",null,n)}const y=e(a,[["render",r]]);export{f as __pageData,y as default};

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1 @@
import{_ as e,c as o,o as i,a1 as t}from"./chunks/framework.gjrnbxUT.js";const f=JSON.parse('{"title":"FAQ","description":"","frontmatter":{},"headers":[],"relativePath":"en/faq/index.md","filePath":"en/faq/index.md"}'),a={name:"en/faq/index.md"},n=t("",28),s=[n];function c(r,l,d,p,h,u){return i(),o("div",null,s)}const b=e(a,[["render",c]]);export{f as __pageData,b as default};

View File

@ -1,2 +1,2 @@
import{_ as e,c as a,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"常见问题","description":"","frontmatter":{},"headers":[],"relativePath":"zh/faq/index.md","filePath":"zh/faq/index.md"}'),s={name:"zh/faq/index.md"},c=i(`<h1 id="常见问题" tabindex="-1">常见问题 <a class="header-anchor" href="#常见问题" aria-label="Permalink to &quot;常见问题&quot;"></a></h1><p>这里将会编写一些你容易遇到的问题。目前有很多,但是我需要花时间来整理一下。</p><h2 id="静态编译的-php-可以安装扩展吗" tabindex="-1">静态编译的 PHP 可以安装扩展吗 <a class="header-anchor" href="#静态编译的-php-可以安装扩展吗" aria-label="Permalink to &quot;静态编译的 PHP 可以安装扩展吗&quot;"></a></h2><p>因为传统架构下的 PHP 安装扩展的原理是使用 <code>.so</code> 类型的动态链接的库方式安装新扩展,而使用本项目编译的静态链接的 PHP 无法<strong>直接</strong>使用动态链接库安装新扩展。</p><p>对于 macOS 平台来说macOS 下的几乎所有二进制文件都无法真正纯静态链接,几乎所有二进制文件都会链接 macOS 的系统库:<code>/usr/lib/libresolv.9.dylib</code> 和 <code>/usr/lib/libSystem.B.dylib</code>。 所以在 macOS 系统下,在特定的编译条件下可以使用静态编译的 php 二进制文件,同时使用动态链接的扩展:</p><ol><li>使用 <code>--no-strip</code> 参数,将不会对二进制文件去除调试符号等信息,以供使用 <code>Xdebug</code> 等外部 Zend 扩展。</li><li>如果要编译某些 Zend 扩展,使用 Homebrew、MacPorts、源码编译的形式在所在的操作系统安装一个普通版本的 PHP。</li><li>使用 <code>phpize &amp;&amp; ./configure &amp;&amp; make</code> 命令编译想要使用的扩展。</li><li>将扩展文件 <code>xxxx.so</code> 拷贝到外部,使用静态编译的 PHP 二进制,例如使用 Xdebug 扩展:<code>cd buildroot/bin/ &amp;&amp; ./php -d &quot;zend_extension=/path/to/xdebug.so&quot;</code>。</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 构建静态 php-cli</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ffi</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-strip</span></span></code></pre></div><p> Linux 使</p><h2 id="-oracle-" tabindex="-1"> Oracle <a class="header-anchor" href="#-oracle-" aria-label="Permalink to &quot; Oracle &quot;"></a></h2><p> <code>oci8</code><code>sourceguardian</code> <code>.a</code><code>.so</code> 使 static-php-cli macOS 使</p><p>使 <a href="https://github.com/crazywhalecc/static-php-cli/discussions/58" target="_blank" rel="noreferrer">standalone-php-cli</a> </p><h2 id="-windows-" tabindex="-1"> Windows <a class="header-anchor" href="#-windows-" aria-label="Permalink to &quot; Windows &quot;"></a></h2><p> WindowsWindows </p><ol><li>Windows *nix 使使</li><li>Windows 使</li></ol><h2 id="使-micro-" tabindex="-1">使 micro <a class="header-anchor" href="#使-micro-" aria-label="Permalink to &quot;使 micro &quot;"></a></h2><p>micro.sfx php php PHP php-src PHP PHP BPCBinary PHP Compiler PHP </p><p></p><p>static-php-clilwmbsswoole-cli php-src 便 phpmicro PHP sapi PHP PHP 使 Swoole CompilerSource Guardian </p><h2 id="使-ssl" tabindex="-1">使 ssl <a class="header-anchor" href="#使-ssl" aria-label="Permalink to &quot;使 ssl&quot;"></a></h2><p>使 curlpgsql HTTPS SSL <code>error:80000002:system library::No such file or directory</code> PHP <code>php.ini</code> <code>openssl.cafile</code> </p><p>使 PHP <code>php.ini</code> INI <code>openssl.cafile=/path/to/your-cert.pem</code> </p><p> Linux curl <a href="https://curl.se/docs/caextract.html" target="_blank" rel="noreferrer">cacert.pem</a> 使 <a href="https://go.dev/src/crypto/x509/root_linux.go" target="_blank" rel="noreferrer">Go </a></p><blockquote><p>INI <code>openssl.cafile</code> 使 <code>ini_set()</code> <code>openssl.cafile</code> <code>PHP_INI_SYSTEM</code> <code>php.ini</code> </p></blockquote>`,23),l=[c];function r(t,p,d,n,h,u){return o(),a("div",null,l)}const b=e(s,[["render",r]]);export{m as __pageData,b as default};
import{_ as e,c as i,o,a1 as a}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"常见问题","description":"","frontmatter":{},"headers":[],"relativePath":"zh/faq/index.md","filePath":"zh/faq/index.md"}'),c={name:"zh/faq/index.md"},p=a(`<h1 id="常见问题" tabindex="-1">常见问题 <a class="header-anchor" href="#常见问题" aria-label="Permalink to &quot;常见问题&quot;"></a></h1><p>这里将会编写一些你容易遇到的问题。目前有很多,但是我需要花时间来整理一下。</p><h2 id="php-ini-的路径是什么" tabindex="-1">php.ini 的路径是什么? <a class="header-anchor" href="#php-ini-的路径是什么" aria-label="Permalink to &quot;php.ini 的路径是什么?&quot;"></a></h2><p>在 Linux、macOS 和 FreeBSD 上,<code>php.ini</code> 的默认路径是 <code>/usr/local/etc/php/php.ini</code>。 在 Windows 中,路径是 <code>C:\\windows\\php.ini</code> 或 <code>php.exe</code> 所在的当前目录。 可以在 *nix 系统中使用手动构建选项 <code>--with-config-file-path</code> 来更改查找 <code>php.ini</code> 的目录。</p><p>此外,在 Linux、macOS 和 FreeBSD 上,<code>/usr/local/etc/php/conf.d</code> 目录中的 <code>*.ini</code> 文件也会被加载。 在 Windows 中,该路径默认为空。 可以使用手动构建选项 <code>--with-config-file-scan-dir</code> 更改该目录。</p><p>PHP 默认也会从 <a href="https://www.php.net/manual/zh/configuration.file.php" target="_blank" rel="noreferrer">其他标准位置</a> 中搜索 <code>php.ini</code>。</p><h2 id="静态编译的-php-可以安装扩展吗" tabindex="-1">静态编译的 PHP 可以安装扩展吗 <a class="header-anchor" href="#静态编译的-php-可以安装扩展吗" aria-label="Permalink to &quot;静态编译的 PHP 可以安装扩展吗&quot;"></a></h2><p>因为传统架构下的 PHP 安装扩展的原理是使用 <code>.so</code> 类型的动态链接的库方式安装新扩展,而使用本项目编译的静态链接的 PHP 无法<strong>直接</strong>使用动态链接库安装新扩展。</p><p>对于 macOS 平台来说macOS 下的几乎所有二进制文件都无法真正纯静态链接,几乎所有二进制文件都会链接 macOS 的系统库:<code>/usr/lib/libresolv.9.dylib</code> 和 <code>/usr/lib/libSystem.B.dylib</code>。 所以在 macOS 系统下,在特定的编译条件下可以使用静态编译的 php 二进制文件,同时使用动态链接的扩展:</p><ol><li>使用 <code>--no-strip</code> 参数,将不会对二进制文件去除调试符号等信息,以供使用 <code>Xdebug</code> 等外部 Zend 扩展。</li><li>如果要编译某些 Zend 扩展,使用 Homebrew、MacPorts、源码编译的形式在所在的操作系统安装一个普通版本的 PHP。</li><li>使用 <code>phpize &amp;&amp; ./configure &amp;&amp; make</code> 命令编译想要使用的扩展。</li><li>将扩展文件 <code>xxxx.so</code> 拷贝到外部,使用静态编译的 PHP 二进制,例如使用 Xdebug 扩展:<code>cd buildroot/bin/ &amp;&amp; ./php -d &quot;zend_extension=/path/to/xdebug.so&quot;</code>。</li></ol><div class="language-bash vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span style="--shiki-light:#6A737D;--shiki-dark:#6A737D;"># 构建静态 php-cli</span></span>
<span class="line"><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;">bin/spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> ffi</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --no-strip</span></span></code></pre></div><p> Linux 使</p><h2 id="-oracle-" tabindex="-1"> Oracle <a class="header-anchor" href="#-oracle-" aria-label="Permalink to &quot; Oracle &quot;"></a></h2><p> <code>oci8</code><code>sourceguardian</code> <code>.a</code><code>.so</code> 使 static-php-cli macOS 使</p><p>使 <a href="https://github.com/crazywhalecc/static-php-cli/discussions/58" target="_blank" rel="noreferrer">standalone-php-cli</a> </p><h2 id="-windows-" tabindex="-1"> Windows <a class="header-anchor" href="#-windows-" aria-label="Permalink to &quot; Windows &quot;"></a></h2><p> WindowsWindows </p><ol><li>Windows *nix 使使</li><li>Windows 使</li></ol><h2 id="使-micro-" tabindex="-1">使 micro <a class="header-anchor" href="#使-micro-" aria-label="Permalink to &quot;使 micro &quot;"></a></h2><p>micro.sfx php php PHP php-src PHP PHP BPCBinary PHP Compiler PHP </p><p></p><p>static-php-clilwmbsswoole-cli php-src 便 phpmicro PHP sapi PHP PHP 使 Swoole CompilerSource Guardian </p><h2 id="使-ssl" tabindex="-1">使 ssl <a class="header-anchor" href="#使-ssl" aria-label="Permalink to &quot;使 ssl&quot;"></a></h2><p>使 curlpgsql HTTPS SSL <code>error:80000002:system library::No such file or directory</code> PHP <code>php.ini</code> <code>openssl.cafile</code> </p><p>使 PHP <code>php.ini</code> INI <code>openssl.cafile=/path/to/your-cert.pem</code> </p><p> Linux curl <a href="https://curl.se/docs/caextract.html" target="_blank" rel="noreferrer">cacert.pem</a> 使 <a href="https://go.dev/src/crypto/x509/root_linux.go" target="_blank" rel="noreferrer">Go </a></p><blockquote><p>INI <code>openssl.cafile</code> 使 <code>ini_set()</code> <code>openssl.cafile</code> <code>PHP_INI_SYSTEM</code> <code>php.ini</code> </p></blockquote>`,27),s=[p];function d(r,l,t,n,h,u){return o(),i("div",null,s)}const b=e(c,[["render",d]]);export{m as __pageData,b as default};

View File

@ -0,0 +1 @@
import{_ as e,c as i,o,a1 as a}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"常见问题","description":"","frontmatter":{},"headers":[],"relativePath":"zh/faq/index.md","filePath":"zh/faq/index.md"}'),c={name:"zh/faq/index.md"},p=a("",27),s=[p];function d(r,l,t,n,h,u){return o(),i("div",null,s)}const b=e(c,[["render",d]]);export{m as __pageData,b as default};

View File

@ -1 +0,0 @@
import{_ as e,c as a,o,a1 as i}from"./chunks/framework.gjrnbxUT.js";const m=JSON.parse('{"title":"常见问题","description":"","frontmatter":{},"headers":[],"relativePath":"zh/faq/index.md","filePath":"zh/faq/index.md"}'),s={name:"zh/faq/index.md"},c=i("",23),l=[c];function r(t,p,d,n,h,u){return o(),a("div",null,l)}const b=e(s,[["render",r]]);export{m as __pageData,b as default};

View File

@ -1 +1 @@
import{_ as i,c as s,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"在 Windows 上构建","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/build-on-windows.md","filePath":"zh/guide/build-on-windows.md"}'),l={name:"zh/guide/build-on-windows.md"},t=e("",64),p=[t];function n(h,o,d,c,r,k){return a(),s("div",null,p)}const g=i(l,[["render",n]]);export{u as __pageData,g as default};
import{_ as i,c as s,o as a,a1 as e}from"./chunks/framework.gjrnbxUT.js";const u=JSON.parse('{"title":"在 Windows 上构建","description":"","frontmatter":{},"headers":[],"relativePath":"zh/guide/build-on-windows.md","filePath":"zh/guide/build-on-windows.md"}'),l={name:"zh/guide/build-on-windows.md"},t=e("",64),p=[t];function n(o,h,d,c,r,k){return a(),s("div",null,p)}const g=i(l,[["render",n]]);export{u as __pageData,g as default};

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1 +1 @@
{"en_contributing_index.md":"CsY8mx8F","deps-map-ext.md":"cLYzvZmT","en_develop_doctor-module.md":"DGd8PeM_","deps-map-lib.md":"CxJnLlc4","en_develop_source-module.md":"CdOHR0ez","en_develop_php-src-changes.md":"DLlooohw","en_guide_extensions.md":"CzjBdSDz","extension-notes.md":"Bw8xYOie","en_guide_deps-map.md":"D57q-e4l","en_faq_index.md":"BQeqR-ad","zh_develop_php-src-changes.md":"Df0-NcBw","zh_develop_doctor-module.md":"DgFAPT6E","zh_guide_action-build.md":"DWMlBDvT","zh_guide_build-on-windows.md":"ChjjDxlJ","zh_guide_deps-map.md":"BEIpfCjp","index.md":"mKXtywCA","zh_guide_index.md":"DV_b9M-6","zh_guide_cli-generator.md":"CHXpgB2Y","zh_guide_env-vars.md":"CfYA93uA","en_guide_build-on-windows.md":"1eIVG-uK","en_develop_index.md":"B7_c9YYa","en_develop_system-build-tools.md":"D6vaAwN3","en_guide_env-vars.md":"DXDG6yvH","en_guide_action-build.md":"BKamBazh","zh_guide_extensions.md":"C3lL2-Mh","en_guide_extension-notes.md":"tqVryutE","en_guide_index.md":"pM3F40Xx","zh_contributing_index.md":"BvgdahxO","en_guide_troubleshooting.md":"BC56sVyT","en_index.md":"Cbpb4iAg","zh_faq_index.md":"D0O0mnML","zh_guide_extension-notes.md":"CBzvwDoL","zh_index.md":"LslJ1UMp","zh_guide_troubleshooting.md":"Da-RmPO_","zh_guide_manual-build.md":"Cnd3-Hxw","en_guide_cli-generator.md":"BRlaVv_A","extensions.md":"B1g6LGS5","zh_develop_structure.md":"B-0RMSSw","zh_develop_index.md":"-CPpDfMx","zh_develop_system-build-tools.md":"Ds53VEw1","en_develop_structure.md":"BA5PDIse","zh_develop_source-module.md":"D0odLsHX","en_guide_manual-build.md":"DM9PZ-zL"}
{"en_guide_deps-map.md":"D57q-e4l","en_develop_system-build-tools.md":"D6vaAwN3","en_develop_structure.md":"BA5PDIse","deps-map-ext.md":"cLYzvZmT","zh_develop_index.md":"-CPpDfMx","zh_develop_php-src-changes.md":"Df0-NcBw","zh_guide_build-on-windows.md":"BxVEYT8r","zh_faq_index.md":"CLzv-BYW","zh_develop_source-module.md":"D0odLsHX","zh_guide_deps-map.md":"BEIpfCjp","en_develop_php-src-changes.md":"DLlooohw","zh_develop_structure.md":"B-0RMSSw","en_guide_manual-build.md":"DEVM2gPi","en_contributing_index.md":"CsY8mx8F","zh_develop_system-build-tools.md":"Ds53VEw1","index.md":"mKXtywCA","en_develop_doctor-module.md":"DGd8PeM_","en_index.md":"Cbpb4iAg","en_guide_extensions.md":"CzjBdSDz","zh_guide_env-vars.md":"CfYA93uA","extension-notes.md":"Bw8xYOie","en_guide_build-on-windows.md":"DfGh0GYv","en_guide_cli-generator.md":"BRlaVv_A","en_guide_index.md":"pM3F40Xx","en_guide_action-build.md":"BKamBazh","zh_guide_cli-generator.md":"CHXpgB2Y","deps-map-lib.md":"CxJnLlc4","en_develop_index.md":"B7_c9YYa","en_faq_index.md":"bJ1fxGWg","zh_develop_doctor-module.md":"DgFAPT6E","zh_contributing_index.md":"BvgdahxO","zh_guide_index.md":"DV_b9M-6","en_guide_troubleshooting.md":"BC56sVyT","zh_guide_extension-notes.md":"CBzvwDoL","en_guide_env-vars.md":"DXDG6yvH","en_develop_source-module.md":"CdOHR0ez","zh_index.md":"LslJ1UMp","zh_guide_extensions.md":"C3lL2-Mh","extensions.md":"B1g6LGS5","zh_guide_action-build.md":"DWMlBDvT","zh_guide_troubleshooting.md":"Da-RmPO_","en_guide_extension-notes.md":"tqVryutE","zh_guide_manual-build.md":"Bn5obQFN"}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long