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!