I've never worked with the Zend Encoder, but it seems like the compiled file must not have a .php extension (because if it does, Apache will handle it as a normal text PHP file, which is what it's doing). I'd say have a look at the Zend docs to see how to configure Apache.
-Keegan