This isn't a problem with PHP. PHP has nothing to do with the installation of qmail. I'd suggest that you look at the qmail site to find installation instructions. Once qmail is installed and running PHP only needs to know what program to run for mail, and that is found in the php.ini file.