mod_headers not sending headers when file is PHP

This is expected behavior when running CGI scripts. From the latest (2.4) version of the mod_headers docs:

The default value of onsuccess may need to be changed to always under the circumstances similar to those listed below. Note also that repeating this directive with both conditions makes sense in some scenarios because always is not a superset of onsuccess with respect to existing headers:

[...]
You're modifying or removing a header generated by a CGI script, in which case the CGI scripts are in the table corresponding to always and not in the default table.

The original issue (with, perhaps, a better explanation) is in Bug 49308.