[php-src] Issue #12975: PHP message Timezone database is corrupt and/ofr pb serializing DateTime object when starting session
| From: | pfrappe | Date: | Tue, 19 Dec 2023 13:42:30 +0000 |
| Subject: | [php-src] Issue #12975: PHP message Timezone database is corrupt and/ofr pb serializing DateTime object when starting session | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-246075@lists.php.net to get a copy of this message | ||
Issue: https://github.com/php/php-src/issues/12975
Author: pfrappe
### Description
This problem occurs repeatedly during the night. I think it could be linked with the fact that
Ubuntu require for an update.
Got these messages in error.log :
AH01071: Got error 'PHP message:
sg_Cache.php(90)<=sg_SynerGaia.php(644)<=sg_Pilote.php(38)<=index.php(66) : (string) ; PHP
message: ...memcached false; PHP message: SG_ERROR : Timezone database is corrupt. Please file a bug
report as this should never happen'
AH01071: Got error 'PHP message: SG_ERROR : Invalid serialization data for DateTime
object', referer: http://81.66.108.70/afo/
AH01071: Got error '; PHP message: PHP Fatal error: Uncaught DateObjectError: Object of type
DateTime has not been correctly initialized by calling parent::__construct() in its constructor in
[no active file]:0\nStack trace:\n#0 [internal function]: DateTime->__serialize()\n#1 {main}\n
thrown in [no active file] on line 0',
The first message is produced in following code (line containing 'journaliser(...)':
if (! $ok and SG_Cache::$typeCache !== SG_Cache::TYPE_APC) {
// Cherche Memcached
if ($pTypeCache === 0 and class_exists('Memcached')) {
$memcache_host = '127.0.0.1';
$memcache_port = 11211;
SG_Cache::$persistent_id = SG_SynerGaia::idRandom();
SG_Cache::$memcache_obj = new \Memcached(SG_Cache::$persistent_id);
SG_Cache::$memcache_obj -> setOption(\Memcached::OPT_LIBKETAMA_COMPATIBLE, true);
SG_Cache::$memcache_obj -> addServer($memcache_host, $memcache_port);
$stats = SG_Cache::$memcache_obj -> getStats();
if ($stats === false) {
journaliser("memcached false", true);
$memcache_ok = false;
} else {
if (isset($stats["$memcache_host:$memcache_port"])) {
$memcache_ok = (bool)$stats["$memcache_host:$memcache_port"];
} else {
$memcache_ok = false;
}
}
if ($memcache_ok) {
SG_Cache::$typeCache = SG_Cache::TYPE_MEMCACHED;
$ok = true;
}
}
}
The other messages probably happen near or during a session_start().
Here is the image of ubuntu require for update (hope paste will work ?):

### PHP Version
PHP 8.3.0 (but before also with 8.1)
### Operating System
Ubuntu 22.04.3 LTS (Jammy Jellyfish)