tags:

views:

52

answers:

3

By default when system() and exec() functions are used in PHP the default user is SYSTEM so I can never see the result. Is there a way to change the user it runs on?

A: 

To addon to webbiedave, you can output or save it to a file. My recommendation would be to save it to a database if you can, this will prevent a race condition.

Nathan Adams
A: 

The web server may have provisions for running scripts as another user (e.g. suEXEC), but PHP itself cannot do so.

Ignacio Vazquez-Abrams
A: 

You can define a cronjob (specific user), that checks a file every minute. With PHP (other user) you can write to this file. If the cronjob find something in the file, it starts processing the task under a specific user. That's is the only way IMHO to change the user.

DrDol