[horde] Upgrade PHP 5.4.45 to 5.6.31
Anton Köstlbacher
horde3 at dingsbums.org
Mon Aug 14 07:59:15 UTC 2017
Am 12.08.2017 um 13:06 schrieb Jan Schneider:
>
> Zitat von Anton Köstlbacher <horde3 at dingsbums.org>:
>
>> Am 11.08.2017 um 17:09 schrieb Jan Schneider:
>>>
>>> Zitat von Anton Köstlbacher <horde3 at dingsbums.org>:
>>>
>>>> Am 11.08.2017 um 15:01 schrieb Jan Schneider:
>>>>>
>>>>> Zitat von Anton Köstlbacher <horde3 at dingsbums.org>:
>>>>>
>>>>>> Am 11.08.2017 um 11:29 schrieb Jan Schneider:
>>>>>>>
>>>>>>> Zitat von Anton Köstlbacher <horde3 at dingsbums.org>:
>>>>>>>
>>>>>>>> Hi Horders,
>>>>>>>>
>>>>>>>> I tried updating a Debian Wheezy PHP from 5.4.45-0+deb7u9 to
>>>>>>>> 5.6.31-1~dotdeb+7.1
>>>>>>>>
>>>>>>>> After upgrading PHP, other apps like Mediakwiki, Wordpress etc.
>>>>>>>> are working just fine.
>>>>>>>>
>>>>>>>> When logging into Horde I get:
>>>>>>>>
>>>>>>>> 2017-08-10T22:25:26+02:00 EMERG: HORDE
>>>>>>>> Horde_Prefs_Scope::serialize() must return a string or NULL [pid
>>>>>>>> 21634 on line 62 of
>>>>>>>> "/usr/share/php/Horde/Prefs/Cache/HordeCache.php"]
>>>>>>>>
>>>>>>>> I disabled all caching, but it doesn't help. There were changes
>>>>>>>> in PHP regarding serialization and also json_decode. Could there
>>>>>>>> be serialized values in hordes prefs table which need to be
>>>>>>>> updated/corrected before upgrading PHP?
>>>>>>>>
>>>>>>>> Sorry if this was asked before, but I couldn't find anything.
>>>>>>>> Thanks for your help!
>>>>>>>>
>>>>>>>> Kind Regards,
>>>>>>>> Anton
>>>>>>>
>>>>>>> It's rather json_encode that seems to failing. Try raising the
>>>>>>> log level to get any warnings and errors from that call.
>>>>>>
>>>>>> Did that already, I found this occurences in the log:
>>>>>>
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE Load config file (conf.php;
>>>>>> app: horde) [pid 25053 on line 110 of
>>>>>> "/usr/share/php/Horde/Registry/Loadconfig.php"]
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE Load config file
>>>>>> (hooks.php; app: horde) [pid 25053 on line 110 of
>>>>>> "/usr/share/php/Horde/Registry/Loadconfig.php"]
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE Read session data
>>>>>> (kaj411tfd43go08ekl7pcquov1) [pid 25053]
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE [horde] Load config file
>>>>>> (nls.php; app: horde) [pid 25053 on line 110 of
>>>>>> "/usr/share/php/Horde/Registry/Loadconfig.php"]
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE [horde] Load config file
>>>>>> (prefs.php; app: horde) [pid 25053 on line 110 of
>>>>>> "/usr/share/php/Horde/Registry/Loadconfig.php"]
>>>>>> 2017-08-10T22:46:26+02:00 EMERG: HORDE [horde]
>>>>>> Horde_Prefs_Scope::serialize() must return a string or NULL [pid
>>>>>> 25053 on line 62 of
>>>>>> "/usr/share/php/Horde/Prefs/Cache/HordeCache.php"]
>>>>>> 2017-08-10T22:46:26+02:00 DEBUG: HORDE 1. require()
>>>>>> /var/www/buero/web/xxxx.de/webmail/login.php:243
>>>>>> 2. Horde_Prefs->getValue()
>>>>>> /var/www/buero/web/xxxx.de/webmail/index.php:62
>>>>>> 3. Horde_Prefs->_getScope() /usr/share/php/Horde/Prefs.php:289
>>>>>> 4. Horde_Prefs->_loadScope() /usr/share/php/Horde/Prefs.php:382
>>>>>> 5. Horde_Prefs_Cache_HordeCache->store()
>>>>>> /usr/share/php/Horde/Prefs.php:457
>>>>>> 6. serialize() /usr/share/php/Horde/Prefs/Cache/HordeCache.php:62
>>>>>>
>>>>>> And second with ActiveSync:
>>>>>>
>>>>>> 2017-08-10T22:50:41+02:00 DEBUG: HORDE 1.
>>>>>> Horde_Rpc_ActiveSync->getResponse()
>>>>>> /var/www/buero/web/xxxx.de/webmail/rpc.php:160
>>>>>> 2. Horde_ActiveSync->handleRequest()
>>>>>> /usr/share/php/Horde/Rpc/ActiveSync.php:143
>>>>>> 3. Horde_ActiveSync->authenticate()
>>>>>> /usr/share/php/Horde/ActiveSync.php:753
>>>>>> 4. Horde_Core_ActiveSync_Driver->authenticate()
>>>>>> /usr/share/php/Horde/ActiveSync.php:578
>>>>>> 5. Horde_Core_ActiveSync_Auth->authenticate()
>>>>>> /usr/share/php/Horde/Core/ActiveSync/Driver.php:221
>>>>>> 6. Horde_Core_Auth_Application->authenticate()
>>>>>> /usr/share/php/Horde/Core/ActiveSync/Auth.php:63
>>>>>> 7. Horde_Core_Auth_Application->_setAuth()
>>>>>> /usr/share/php/Horde/Core/Auth/Application.php:150
>>>>>> 8. Horde_Registry->setAuth()
>>>>>> /usr/share/php/Horde/Core/Auth/Application.php:673
>>>>>> 9. Horde_Registry->preferredLang()
>>>>>> /usr/share/php/Horde/Registry.php:2616
>>>>>> 10. Horde_Prefs->getValue() /usr/share/php/Horde/Registry.php:2843
>>>>>> 11. Horde_Prefs->_getScope() /usr/share/php/Horde/Prefs.php:289
>>>>>> 12. Horde_Prefs->_loadScope() /usr/share/php/Horde/Prefs.php:382
>>>>>> 13. Horde_Prefs_Cache_HordeCache->store()
>>>>>> /usr/share/php/Horde/Prefs.php:457
>>>>>> 14. serialize() /usr/share/php/Horde/Prefs/Cache/HordeCache.php:62
>>>>>>
>>>>>> Uptodate Horde Webmail. Disabled cache and emptied cache and
>>>>>> static directories. Deleted sessions and cookies.
>>>>>
>>>>> Then you seem to have a broken json extension.
>>>>>
>>>>> json_encode is only supposed to return a non-string, i.e. a boolean
>>>>> value of false, on an error condition. And error would show up in
>>>>> the logs.
>>>>> Did you check your error_reporting level too?
>>>>
>>>> error_reporting is E_ALL. Nothing in Apache error log.
>>>>
>>>> Just tested json_encode with simple data, it does work. phpinfo says:
>>>>
>>>> json support enabled
>>>> json version 1.2.1
>>>>
>>>> I tried the following:
>>>>
>>>> Log "$this->_prefs" in /usr/share/php/Horde/Prefs/Scope.php
>>>> serialize().
>>>>
>>>> It showed a broken umlaut in my "fullname" pref. In other prefs the
>>>> umlauts are ok. I deleted the "fullname" pref in the db and now I
>>>> can log in and the UI shows up correctly.
>>>>
>>>> "Array ( [id] => [fullname] => Array ( [v] => Toni K�stlbacher [d]
>>>> => )"
>>>>
>>>> Seems to be a similar issue as in
>>>> http://marc.info/?l=kronolith&m=144654455532422&w=2
>>>>
>>>> We use horde since version 2 and at some point we converted the
>>>> tables to UTF-8. It seems there are some values in the pref-Blobs
>>>> which now make problems using PHP 5.6.
>>>>
>>>> Do you have an idea how to parse the prefs-blobs to eventually
>>>> identify the broken characters?
>>>
>>> There is no solution that would fit all possible problems with broken
>>> charsets. There are just too many places where the charset conversion
>>> could have gone wrong. You would need a solution tailored to your
>>> exact problem.
>>
>> If you can give me a hint how to fetch all prefs from all users from
>> the db i can figure it out myself. I couldn't find any documentation
>> how to do that. Thanks in advance!
>
> They are all stored in the horde_prefs table, if you are using an SQL
> backend for prefs. If this is what you mean.
I use SQL Backend. Are there docs or an example script on how to fetch
and deserialize the binary fields in the prefs table or do I have to
search in the horde source code how it's done? I would be grateful, if
you could provide information on that.
More information about the horde
mailing list