SESSION variable ‘max_allowed_packet’ is read-only
-
Got installer error:
SESSION variable ‘max_allowed_packet’ is read-only. Use SET GLOBAL to assign the value
Trace: #0 /var/www/html/dup-installer/ctrls/ctrl.s2.dbinstall.php(60): mysqli_query() #1 /var/www/html/dup-installer/ctrls/ctrl.s2.base.php(139): DUPX_DBInstall->__construct() #2 /var/www/html/dup-installer/main.installer.php(230): require_once('...') #3 {main}
Lines 59 and 60 of dbinstall.php are:
@mysqli_query($this->dbh, “SET GLOBAL max_allowed_packet = “.mysqli_real_escape_string($this->dbh, $GLOBALS[‘DB_MAX_PACKETS’]));
@mysqli_query($this->dbh, “SET max_allowed_packet = “.mysqli_real_escape_string($this->dbh, $GLOBALS[‘DB_MAX_PACKETS’]));What??? What is the intent? Unless I’m dyslexic these 2 queries are identical with the only difference that the first one uses ‘GLOBAL’. From the trace we can see that the use of GLOBAL does indeed work. So what is the purpose of line 60? I can’t even speculate. Is it’s presence an error, can it be deleted? Some research on max_allowed_packet revealed that it hasn’t always been read-only. But even if that is true what is the purpose of these 2 consecutive queries?
- The topic ‘SESSION variable ‘max_allowed_packet’ is read-only’ is closed to new replies.