This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
program_lang:php [2021/10/12 09:59] manu created |
program_lang:php [2021/10/12 10:06] (current) manu [Get info on php] |
||
---|---|---|---|
Line 10: | Line 10: | ||
</cli> | </cli> | ||
- | Here we can see php version and detail config like php.ini file | + | Here we can see php version and detail config like php.ini file, version of each module... |
<cli prompt='#'> | <cli prompt='#'> | ||
[root@apache1 dokuwiki]# php -i | [root@apache1 dokuwiki]# php -i | ||
Line 29: | Line 29: | ||
</cli> | </cli> | ||
+ | List loaded modules | ||
+ | <cli prompt='#'> | ||
+ | [root@apache1 dokuwiki]# php -m | ||
+ | [PHP Modules] | ||
+ | bz2 | ||
+ | calendar | ||
+ | Core | ||
+ | ctype | ||
+ | curl | ||
+ | date | ||
+ | dom | ||
+ | ereg | ||
+ | exif | ||
+ | fileinfo | ||
+ | filter | ||
+ | ftp | ||
+ | gettext | ||
+ | hash | ||
+ | iconv | ||
+ | json | ||
+ | ldap | ||
+ | libxml | ||
+ | mbstring | ||
+ | mhash | ||
+ | openssl | ||
+ | pcntl | ||
+ | pcre | ||
+ | Phar | ||
+ | readline | ||
+ | Reflection | ||
+ | session | ||
+ | SimpleXML | ||
+ | sockets | ||
+ | ... | ||
+ | </cli> | ||
+ | |||
+ | Check PHP consistence, here bad version of mstring module, and time zone not set | ||
+ | <cli prompt='#'> | ||
+ | [root@apache1 dokuwiki]# php -i | grep -i "Loaded Configuration File" | ||
+ | PHP Warning: PHP Startup: mbstring: Unable to initialize module | ||
+ | Module compiled with module API=20100525 | ||
+ | PHP compiled with module API=20131226 | ||
+ | These options need to match | ||
+ | in Unknown on line 0 | ||
+ | Loaded Configuration File => /etc/opt/rh/rh-php56/php.ini | ||
+ | PHP Warning: Unknown: It is not safe to rely on the system's timezone settings. You are *required* to use the date.timezone setting or the date_default_timezone_set() function. In case you used any of those methods and you are still getting this warning, you most likely misspelled the timezone identifier. We selected the timezone 'UTC' for now, but please set date.timezone to select your timezone. in Unknown on line 0 | ||
+ | </cli> | ||
+ | |||
+ | In my case modules are located into **/opt/rh/rh-php56/root/usr/lib64/php/modules** (php -i) | ||