Search notes:

PHP code snippets: apache_get_modules

Return an array of loaded apache modules.
apache_get_modules is only available when the PHP is installed as a module. If PHP is not running as FPM or fCGI or not in an Apache environment, apache_get_modules() does not exist. Therefore, the following snippet checks for the availability of this function with function_exists.
if (function_exists('apache_get_modules')) {
  print('<p>apache_get_modules: <br>- ' . join('<br>- ', apache_get_modules()));
}
else {
   print('<p>apache_get_modules() is not defined.;');
}

See also

Other PHP snippets

Index

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php:78 Stack trace: #0 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(78): PDOStatement->execute(Array) #1 /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php(30): insert_webrequest_('/notes/developm...', 1745910717, '18.118.151.13', 'Mozilla/5.0 App...', NULL) #2 /home/httpd/vhosts/renenyffenegger.ch/httpsdocs/notes/development/web/php/snippets/apache/get_modules(45): insert_webrequest() #3 {main} thrown in /home/httpd/vhosts/renenyffenegger.ch/php/web-request-database.php on line 78