Are you sure it's not working for html files? In a browser you should not notice any difference between a compressed and uncompressed page, except it might download a bit faster. Looking at the headers in something like Firebug should show that the page has a "Content-Encoding: gzip" header.
You can turn compression on for individual PHP pages using this code:
<?php
ini_set('zlib.output_compression', TRUE);