Take the 2-minute tour ×

Somehow, one of our sites continues to be compromised. Is there a way that I can log every command that PHP runs, either via system(), exec(), etc?

share|improve this question
add comment

1 Answer

up vote 3 down vote accepted

You can use override-function, and rename_function rewrite the system and exec commands, do a stack trace from there and log it to a file.

share|improve this answer
Is there a way to do this across an entire site, or just for a single page? –  Glen Solsberry Jun 11 '10 at 14:31
add comment

Your Answer


