I've always believed that PHP works better installed as an Apache module, but recently, someone on a local forum pointed out that running PHP as CGI is better security-wise. I've done some googling and it appears that Dreamhost defaults its PHP installation to working via CGI. Now I'm a little puzzled.
As far as I understand (I'm no sysadmin, just a web developer), there's the problem of user permissions when PHP is installed as an Apache module. And there's the problem of speed when using PHP via CGI (or it was).
What's the recommended way nowadays for installing PHP? On both shared and dedicated hosting.