add better gzdecode support for php native fetch, use curl under open_basedir
db-prefs: use user_error
move db-prefs to OO