I
I
Ivan Nikolaevich2016-02-04 12:59:23
PHP
Ivan Nikolaevich, 2016-02-04 12:59:23

How to enable modules from under PHP CLI as from under Apache?

1. The paths for parsing extension ini files are the same, they use the same php.ini file.
2. From under root php in CLI mode gives all modules (connects all extensions).
3. Only a part of the modules works in the CLI mode as a user in the system. Those. PHP-CLI does not pick up the module file.
How to make PHP CLI load all extensions from under user?

PHP CLI: php -m
d8127a9cd03d45448960600c1350e72a.png
PHP CLI: php -i
0e947912a83e48a28c0f19c9cc867fee.png
PHP Apache: get_loaded_extensions()
34eaff7f02f24174b660ec9cfd2181cf.png
PHP Apache: phpinfo()
8ce4e132a26b46958361927ed95d27c2.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
M
Mikhail Konyukhov, 2016-02-04
@piromanlynx

Problem source options:
Usually when you run "php -m" - you can see Warning - and that he could not do something.
It's called startup_errors - look at the main php.ini and enable the option to show them: display_startup_errors

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question