I noticed this while trying to use %{mod_php_memory_usage} in a LogFormat directive. The PHP source (sapi_apache2.c) calls apr_psprintf using a %zu format. Instead of expanding, %zu is written in plain text to the log file. Doesn't look like many other people have stumbled on this issue, I only turned up one with this specific problem: http://stackoverflow.com/questions/21549852/apache-mod-php-memory-usage-prints-zu-instead-of-useful-data I looked at the glibc source, but %z has existed there for 10+ years. So I went looking at the php source. Here is the php commit from May 16, 2011 that implemented the %zu, but the comment isn't terribly descriptive: https://github.com/php/php-src/commit/e0df4e3dba7c4ab92442b9e82c1de01fdbaa3cce I see that you've implemented other characters to expand over time, so I thought this would be a good one to add to the list.
The z prefix is standard with C99, so it would be nice for APR to support that in a future release (i.e., starting with APR 1.6 or 2.0). PHP should be using APR_SIZE_T_FMT, as in the following call: apr_psprintf(ctx->r->pool, "%" APR_SIZE_T_FMT, zend_memory_peak_usage(1 TSRMLS_CC))); I posted that to the PHP folks via https://github.com/php/php-src/pull/641. We'll leave this APR issue open as an enhancement request.