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?
views:
52answers:
3
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
2010-04-02 21:42:19
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
2010-04-02 21:45:56
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
2010-04-02 21:49:42