PHP setup/locked_files fixes.

PHP setup WIP.