You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/en/faq/index.md
+13-1
Original file line number
Diff line number
Diff line change
@@ -2,7 +2,19 @@
2
2
3
3
Here will be some questions that you may encounter easily. There are currently many, but I need to take time to organize them.
4
4
5
-
## Can statically compiled PHP install extensions?
5
+
## What is the path of php.ini ?
6
+
7
+
On Linux, macOS and FreeBSD, the path of `php.ini` is `/usr/local/etc/php/php.ini`.
8
+
On Windows, the path is `C:\windows\php.ini` or the current directory of `php.exe`.
9
+
The directory where to look for `php.ini` can be changed on *nix using the manual build option `--with-config-file-path`.
10
+
11
+
In addition, on Linux, macOS and FreeBSD, `.ini` files present in the `/usr/local/etc/php/conf.d` directory will also be loaded.
12
+
On Windows, this path is empty by default.
13
+
The directory can be changed using the manual build option `--with-config-file-scan-dir`.
14
+
15
+
`php.ini` will also be searched for in [the other standard locations](https://www.php.net/manual/configuration.file.php).
16
+
17
+
## Can statically-compiled PHP install extensions?
6
18
7
19
Because the principle of installing extensions in PHP under the traditional architecture is to install new extensions using `.so` type dynamic link libraries,
8
20
and statically linked PHP compiled using this project cannot **directly** install new extensions using dynamic link libraries.
Copy file name to clipboardExpand all lines: docs/en/guide/build-on-windows.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -160,7 +160,7 @@ You can try to use the following commands:
160
160
-`--with-clean`: clean up old make files before compiling PHP
161
161
-`--enable-zts`: Make compiled PHP thread-safe version (default is NTS version)
162
162
-`--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extension optional functions
163
-
-`--with-config-file-path=XXX`: Set the path in which to look for php.ini
163
+
-`--with-config-file-scan-dir=XXX`: Set the directory to scan for `.ini` files after reading `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths)
164
164
-`-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`)
165
165
-`--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`)
166
166
-`--disable-opcache-jit`: Disable opcache jit (enabled by default)
Copy file name to clipboardExpand all lines: docs/en/guide/manual-build.md
+2-1
Original file line number
Diff line number
Diff line change
@@ -304,7 +304,8 @@ You can try to use the following commands:
304
304
-`--enable-zts`: Make compiled PHP thread-safe version (default is NTS version)
305
305
-`--no-strip`: Do not run `strip` after compiling the PHP library to trim the binary file to reduce its size (the macOS binary file without trim can use dynamically linked third-party extensions)
306
306
-`--with-libs=XXX,YYY`: Compile the specified dependent library before compiling PHP, and activate some extended optional functions (such as libavif of the gd library, etc.)
307
-
-`--with-config-file-path=XXX`: Set the path in which to look for php.ini
307
+
-`--with-config-file-path=XXX`: Set the path in which to look for `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths)
308
+
-`--with-config-file-scan-dir=XXX`: Set the directory to scan for `.ini` files after reading `php.ini` (Check [here](../faq/index.html#what-is-the-path-of-php-ini) for default paths)
308
309
-`-I xxx=yyy`: Hard compile INI options into PHP before compiling (support multiple options, alias is `--with-hardcoded-ini`)
309
310
-`--with-micro-fake-cli`: When compiling micro, let micro's `PHP_SAPI` pretend to be `cli` (for compatibility with some programs that check `PHP_SAPI`)
310
311
-`--disable-opcache-jit`: Disable opcache jit (enabled by default)
$this->addOption('with-config-file-path', null, InputOption::VALUE_REQUIRED, 'Set the path in which to look for php.ini');
37
+
$this->addOption('with-config-file-path', null, InputOption::VALUE_REQUIRED, 'Set the path in which to look for php.ini', $isWindows ? null : '/usr/local/etc/php');
38
+
$this->addOption('with-config-file-scan-dir', null, InputOption::VALUE_REQUIRED, 'Set the directory to scan for .ini files after reading php.ini', $isWindows ? null : '/usr/local/etc/php/conf.d');
0 commit comments