Skip to main content

Posts

Showing posts with the label apache

Passing PHP data to Apache access logs

Recently, I worked on a project to collect performance data from an application at work and pass that data to Apache access logs as part of a performance improvement project. As it turns out, PHP has a built-in function called apache_note() that your can use for this purpose. For example, if you wish to pass memory usage information to Apache access logs, add the following code to at the end of your front controller file: if (php_sapi_name() != 'cli') { apache_note('PHPMemoryUsage', memory_get_peak_usage(true)); } Then, update your Apache LogFormat directive to include this new piece of information: LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\" %{PHPMemoryUsage}n" combined

Fedora 12 upgrade woes: Apache issues

Could not start the httpd service for a while due to: Syntax error on line 196 of /etc/httpd/conf/httpd.conf: Cannot load /etc/httpd/modules/mod_file_cache.so into server: /etc/httpd/modules/mod_file_cache.so: cannot open shared object file: No such file or directory I had to manually comment out two unneeded modules from the /etc/httpd/conf/httpd.conf: #LoadModule file_cache_module modules/mod_file_cache.so #LoadModule mem_cache_module modules/mod_mem_cache.so More here .