turned out the php file can't run in the current server due to permission issues, unless it chown the files with the user "Apache", so we used sed in the command line to implement the search and replace job