as PHP runs at the same user as the Webserver, you always wilf be forced to be this user. I don't know a workarround for this. Sure you can add several users to the www-data user group but that would result in a security hole.
Concerning curses apps there might be a way with php5 which features a couple of improvements for that. But I do currently not have the time to work on that as I'm busy with work and my other projects ;-)

Thank You!

cheers bzrudi

If you would like to refer to this comment somewhere else in this project, copy and paste the following link: