Use the 'WrapUserCGI' option and read the
CGI-wrapper HOWTO. Note that using CGI via the CGI-wrapper is slower than using FastCGI.
You could do it via FastCGI, but that means that you have to spawn a PHP FastCGI instance for every user. That's not very memory efficient.