PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
It really depends on your platform as well as which language you want to use. A bash script in linux would be able to handle the task of automating a php install.
Well, I don't know of any open source install generators and performing this kind of operation is not a trivial task therefore I wouldn't expect anyone to post sample code here (unless ofcourse they do find it free somewhere on the net).