I trying to install NPFchan, but I getting this error
How to overcome this?
Why you don't let embed youtube videos?
There might be multiple things (I assume two) causing the errors you get (been ages since I used or looked at the NPFchan code)
I can't remember what order the update scripts had to be run in, so just run them in sequence until all have completed without error (skipping those who previously completed). But I think once all those have run successfully the "offset of value null" should be fixed.
Regarding Twig (template engine) error the easiest is probably trying to upgrade Twig to latest version placing the new version of the code in the /inc/lib/Twig/ folder (assuming it hasn't changed too much stuff or deprecating stuff NPFchan/vichan uses in templates). Another way is to downgrade PHP to previous major version (prior to deprecating the "nested ternary if" (or what to call it). https://twig.symfony.com>all this is just speculations as I don't have the code at hand