Reputation: 217
1- When running php cli, does this use the same main php binary used by web servers (for example php cgi or php-fpm), or it's a seperate binary?
2- When installing php as fpm, two packages are required, php and php-fpm, so what's the difference between the two? thanks...
Upvotes: 0
Views: 364
Reputation: 2591
For sure each of them could use different php.ini
configuration file therefore each of them could behave differently, ie using different binaries, modules, etc.
Create a file phpinfo.php
in your web root with content:
<?php
echo phpinfo();
and run it:
php /path/to/your/web/root/phpinfo.php
php -i
And compare the differences.
Note: to quickly find what *.ini files are in use you could:
print_r(php_ini_loaded_file());
in your GLI scriptphp --ini
in your terminal CLIUpvotes: 2