There is a number of tools that aim to achieve this, with different feature sets:
- http://www.apphp.com/php-easyinstaller/
- http://www.phpclasses.org/browse/package/3072.html
- http://www.phpclasses.org/browse/package/2543.html
- http://www.vadimg.com/2009/06/24/application-installer-wizard-class/
- http://github.com/SunboX/Php-Web-Application-Installer
- http://sourceforge.net/projects/upcase-project/
- http://sourceforge.net/projects/zzossinstaller/
- http://sourceforge.net/projects/phpappinstaller/
- http://sourceforge.net/projects/piap/
These are collected from a blogpost by cweiske
- http://cweiske.de/tagebuch/Generic%20PHP%20application%20installers.htm
- http://kore-nordmann.de/blog/0097_php_web_installer.html
If you dont need a generic tool, the easiest would be to write a simple install script and ask users to run it. This can be as easy as a single file that prints a form and asks for the required details. When submitted, do the necessary install routines.