No no... this works fine. If you are logged in as "someone" on SSH and run a php script this will be a proccess of "someone". When you try the same thing from web (through apache) the same php script will be a proccess of "apache" and not "someone".
Imagine that you have a file-manager and you upload eg. 5 files . All these files are owned by "apache" (usually nobody if you have installed apache 1.3.2x). To modify these files you either use the file-manager (user: nobody) or you chmod them with 777 so the "someone" user can modify them too!
Result: you have half files owned by you and half files owned by apache... :P To solve this you must compile php as CGI and use Suexec of apache to change the user of every virtualserver you have in your httpd.conf.
...looking for the answer over 1 year now... nothing yet