I have contracted the free plan. What PHP version is using?

Free hosting uses PHP 8.2

After reading your problem more thoroughly, I think there’s nothing to do with the PHP version. Since you say you migrated the site, I suppose you are using localhost as your DB host, which is simply incorrect here.

I also don’t think there’s a thing called PHP 7.8. There’s only 7.4.