If you're running this script right using http request, i.e. it gets runned by webserver with privileges of user like
sed -icommand used in this script just can't change anything in the files that
findfounds due to insufficient privileges.
Your PHP installation might have backticks and/or any other form of command execution disabled, as it is usually a direct security threat (using
safe_mode, using PHP suhosin patch directives, etc).
Your best bet would be checking webserver logs on hosts that haven't executed this script.