Line 30 of index.php is:
What are ownerships/permissions on config.php?
Moving/migrating a site probably done as root user ... sometimes getting files into place as root also tags files as belonging to the root user.
It's ok that config.php file is owned by root ... but permisisons are key ... user underwhich web service runs must be able to 'read' config.php. So depending upon how paranoid one is, config.php could belong to root user and group, but *all others* have to be able to at least read the file.
If can't read config.php then it would follow all the DB settings in that file cannot also not be read ... could lead to some strange behavior.
'spirit of sharing', Ken