PHP Modules Tutorials - Herong's Tutorial Examples
∟Configuration and Modules
This chapter provides tutorial examples and notes on PHP configuration and loading modules. Topics include viewing and changing configuration settings; php.ini and additional .ini files; phpinfo() function and 'php -i' command; loading PHP modules; module files in extension_dir directory.
Manage Runtime Configuration Directives
"php -i" - Display Configuration Information
php.ini - Configuration Directive File
Additional .ini Configuration Files
Load PHP Extensions/Modules
extension_dir - Module Library Location
"php -m" - Display Loaded Modules
get_extension_funcs() - Get Module Functions
dl() - Load Module Dynamically
Takeaways:
- "php -i" command displays all configuration settings and their values.
- phpinfo() function prints all configuration settings and their values
to the STDOUT stream.
- ini_get_all() function returns all configuration settings and their values
as an associative array.
- "./configure" tool is commonly used to build PHP runtime binary code.
- php.ini is the primary configuration file for the entire system.
- Additional .ini files are used to specify configuration settings
for individual modules.
- "php -m" displays all modules currently loaded in the PHP runtime.
- Some commonly used modules are built-in or bundled with the PHP core
binary code.
- Some modules are included in the PHP core distribution package,
and require extension={module_name} configuration settings to load.
- get_extension_funcs() function returns all function names
of a given loaded module.
- dl() function loads a given module from the library file
in the "extension_dir" directory.
Table of Contents
About This Book
Introduction and Installation of PHP
Managing PHP Environment and Modules on macOS
Managing PHP Environment and Modules on CentOS
►Configuration and Modules
cURL Module - Client for URL
DOM Module - Parsing HTML Documents
GD Module - Manipulating Images and Pictures
MySQLi Module - Accessing MySQL Server
OpenSSL Module - Cryptography and SSL/TLS Toolkit
PCRE Module - Perl Compatible Regular Expressions
SOAP Module - Creating and Calling Web Services
SOAP Module - Server Functions and Examples
Zip Module - Managing ZIP Archive Files
References
Index
Full Version in PDF/EPUB