Error pages not working for .php extension

I’m using apache as a web server. The error pages are configured through the .htaccess file.

I didn’t think I was using nginx

I’ve certainly not modified the default configuration of nginx.