Home  >  Article  >  Backend Development  >  How do I Find the php.ini File Used by the PHP Command Line (CLI)?

How do I Find the php.ini File Used by the PHP Command Line (CLI)?

Patricia Arquette
Patricia ArquetteOriginal
2024-10-26 19:47:30975browse

How do I Find the php.ini File Used by the PHP Command Line (CLI)?

locating the php.ini for php-cli

The issue is that the php command line is using a different php.ini from the main php interpreter. For example, you might have included an extra path for an external library in the main php.ini, but this is not present in the cli version, resulting in a path inclusion error.

To find the php.ini for php-cli, you can use the following command:

<code class="php">php -i |grep php\.ini</code>

The above is the detailed content of How do I Find the php.ini File Used by the PHP Command Line (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