Thanks for the details. It should not harm to remove the cache and zp-data folders. The latter is part of the package, too, so normally is uploaded.
Although you don't need to remove those two folders on an upgrade at all. The config file in zp-data will be just used. You only need to replace zp-core, the official themes within the themes folder and the root index.php file (as described on the installation page).
If you remove zp-data it is a kind of reinstall but if the database is still there all that is actually different is that you have to re-enter db credentials to re-create the config file. All else is an upgrade therefore as also the admin user is still there to login.
I quickly just deleted the zp-data folder on a local test install to do the same. I could not reproduce your error but again only could reproduce this ticket: https://github.com/zenphoto/zenphoto/issues/844
Quote: (btw How can i prevent display of php messages on web pages?)
Depends on your host. You can set that via htaccess, a php.ini or via php.