import{Gase,Kast,atasn,jasr}from"./chunks/framework.DrNIf5Lg.js";vari=JSON.parse(`{"title":"FAQ","description":"","frontmatter":{},"headers":[],"relativePath":"en/faq/index.md","filePath":"en/faq/index.md"}`),a={name:`en/faq/index.md`};functiono(r,i,a,o,s,c){returnn(),e(`div`,null,[...i[0]||=[t(`<h1 id="faq" tabindex="-1">FAQ <a class="header-anchor" href="#faq" aria-label="Permalink to “FAQ”"></a></h1><p>Here will be some questions that you may encounter easily.</p><h2 id="what-is-the-path-of-php-ini" tabindex="-1">What is the path of php.ini? <a class="header-anchor" href="#what-is-the-path-of-php-ini" aria-label="Permalink to “What is the path of php.ini?”"></a></h2><p>On Linux, macOS and FreeBSD, the path of <code>php.ini</code> is <code>/usr/local/etc/php/php.ini</code>. On Windows, the path is <code>C:\\windows\\php.ini</code> or the current directory of <code>php.exe</code>. The directory where to look for <code>php.ini</code> can be changed on *nix using the build option <code>--with-config-file-path</code>.</p><p>In addition, on Linux, macOS and FreeBSD, <code>.ini</code> files present in the <code>/usr/local/etc/php/conf.d</code> directory will also be loaded. On Windows, this path is empty by default. The directory can be changed using the build option <code>--with-config-file-scan-dir</code>.</p><p><code>php.ini</code> will also be searched for in <a href="https://www.php.net/manual/configuration.file.php" target="_blank" rel="noreferrer">the other standard locations</a>.</p><h2 id="can-statically-compiled-php-install-extensions" tabindex="-1">Can statically-compiled PHP install extensions? <a class="header-anchor" href="#can-statically-compiled-php-install-extensions" aria-label="Permalink to “Can statically-compiled PHP install extensions?”"></a></h2><p>Because the principle of installing PHP extensions under the normal mode is to use <code>.so</code> type dynamic link library to install new extensions, and we use the static link PHP compiled by this project. However, static linking has different definitions in different operating systems.</p><p>First of all, for Linux systems, statically linked binaries will not link the system's dynamic link library. Purely statically linked binaries (<code>build with -all-static</code>) cannot load dynamic libraries, so new extensions cannot be added. At the same time, in pure static mode, you cannot use extensions such as <code>ffi</code> to load external <code>.so</code> modules.</p><p>You can use the command <code>ldd buildroot/bin/php</code> to check whether the binary you built under Linux is purely statically linked.</p><p>If you build GNU libc based PHP, you can use the <code>ffi</code> extension to load external <code>.so</code> modules and load <code>.so</code> extensions with the same ABI.</p><p>For example, you can use the following command to build a static PHP binary dynamically linked with glibc, supporting FFI extensions and loading the <code>xdebug.so</code> extension of the same PHP version and the same TS type:</p><div class="language-bash"><button title="Copy Code" class="copy"></button><span class="lang">bash</span><pre class="shiki shiki-themes github-light github-dark" style="--shiki-light:#24292e;--shiki-dark:#e1e4e8;--shiki-light-bg:#fff;--shiki-dark-bg:#24292e;" tabindex="0" dir="ltr"><code><span class="line"><span style="--shiki-light:#24292E;--shiki-dark:#E1E4E8;">SPC_TARGET</span><span style="--shiki-light:#c62739;--shiki-dark:#F97583;">=</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;">native-native-gnu.2.17</span><span style="--shiki-light:#6F42C1;--shiki-dark:#B392F0;"> spc</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> build:php</span><span style="--shiki-light:#032F62;--shiki-dark:#9ECBFF;"> "ffi,xml"</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> --build-cli</span><span style="--shiki-light:#005CC5;--shiki-dark:#79B8FF;"> -vvv</span></span>