Home >Backend Development >PHP Tutorial >Where is the PHP.ini File Used by the Command Line Interface (CLI)?

Where is the PHP.ini File Used by the Command Line Interface (CLI)?

Patricia Arquette
Patricia ArquetteOriginal
2024-12-02 14:15:11617browse

Where is the PHP.ini File Used by the Command Line Interface (CLI)?

Locating the PHP.ini File Used by the Command Line (CLI)

In the pursuit of enabling the PDO MySQL extension in EasyPHP, a user encountered an issue despite modifying the php.ini file. It was then realized that the CLI uses a separate php.ini file. The question thus arose: how can one locate this CLI-specific php.ini file?

To determine the location of the php.ini file used by the command line, execute the following code:

php --ini

Within the output, search for "Loaded Configuration File." This line displays the path to the php.ini file utilized by the CLI. By navigating to this file and making the necessary adjustments, you can ensure that the desired extensions are properly enabled for your CLI environment.

The above is the detailed content of Where is the PHP.ini File Used by the Command Line Interface (CLI)?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn