If you're stuck on PHP 5.2 for something legacy I suggest you look for alternative hosting that allows you to run multiple PHP versions, with PHP-FPM you can run PHP installations side by side. I don't think you will find much that will work on such an old version, and you're just asking to be attacked from a security point of view. 5.2 was last updated in 2011, it's 8 years out of date and missing many many new features that modern scripts rely on.
If you are looking for such a setup that is customized and tuned for your requirements I can assist you with this if you're interested (we can even mitigate most of the php5.2 security concerns). Alternatively, I have helped many clients migrate code from old PHP versions to modern versions with over 20 years of professional PHP development experience under my belt.
As for your git viewer, while it's not lightweight I highly recommend deploying a GitLab server for this, not only is it easy to use, but it is backed by a large company that continues to update and maintain it.