User Tools

Site Tools


doc:appunti:linux:sa:debian_upgrade_11_12

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
doc:appunti:linux:sa:debian_upgrade_11_12 [2025/03/20 12:30] – [OpenVPN BF-CBC not supported] niccolodoc:appunti:linux:sa:debian_upgrade_11_12 [2026/07/20 18:12] (current) – [Sintassi per costruttore di classe PHP] niccolo
Line 58: Line 58:
  
 ===== PHP ===== ===== PHP =====
 +
 +==== get_magic_quotes_gpc() ====
  
 Con l'introduzione di **PHP 8.2** la funzione **get_magic_quotes_gpc()** è stata definitivamente rimossa e quindi generea un errore. Con l'introduzione di **PHP 8.2** la funzione **get_magic_quotes_gpc()** è stata definitivamente rimossa e quindi generea un errore.
 +
 +==== Sintassi per costruttore di classe PHP ====
 +
 +PHP 4 usava una convezione per i costruttori di classe: un metodo con lo stesso nome della sua classe veniva automaticamente trattato come costruttore ed eseguito su **new className()**:
 +
 +<code php>
 +class className {
 +    protected $varName;
 +    function className() {
 +        $this->varName = 'value';
 +    }
 +}
 +</code>
 +
 +Tale convenzione è stata deprecata in PHP 7.0 e rimossa completamente in PHP 8.0. Questa è la nuova sintassi necessaria:
 +
 +<code php>
 +class className {
 +    protected $varName;
 +    function __construct() {
 +        $this->varName = 'value';
 +    }
 +}
 +</code>
 +
 +==== PHP dbConnect->prepare() ====
 +
 +Con le versioni precedenti di PHP era possibile usare una sintassi del tipo:
 +
 +<code php>
 +$stmt = $this->dbConnect->prepare('SELECT ...');
 +if ($stmt) {
 +    // Do something
 +}
 +$stmt = $this->dbConnect->prepare('DELETE FROM ...');
 +</code>
 +
 +Con il nuovo PHP è necessario chiudere il primo statement prima di aprirne uno nuovo, altrimenti si ottiene l'errore
 +
 +<code>
 +PHP Fatal error:  Uncaught mysqli_sql_exception: Commands out of sync;
 +    you can't run this command now in /var/www/...
 +</code>
 +
 +La soluzione è chiudere lo statement prima di aprirne un altro:
 +
 +<code php>
 +$stmt = $this->dbConnect->prepare('SELECT ...');
 +if ($stmt) {
 +    // Do something
 +    $stmt->close();
 +}
 +$stmt = $this->dbConnect->prepare('DELETE FROM ...');
 +</code>
  
 ===== SpamAssassin ===== ===== SpamAssassin =====
Line 145: Line 201:
  
 <code> <code>
-# OpenVPN 2.6 using TLS should use the --data-ciphers option+The --cipher option should not be used any longer with OpenVPN 2.6 in TLS mode. 
-data-ciphers AES-256-GCM:AES-128-GCM:AES-256-CBC+#cipher AES-256-CBC 
 +# Use --data-ciphers adding the AES-256-CBC to the default value, e.g. for OpenVPN 2.3 clients
 +data-ciphers AES-256-GCM:AES-128-GCM:CHACHA20-POLY1305:AES-256-CBC 
 +# Use --data-ciphers-fallback for peers that are old or have negotiation disabled, 
 +# e.g. peers running OpenVPN 2.3 or older, or some embedded devices.
 data-ciphers-fallback AES-256-CBC data-ciphers-fallback AES-256-CBC
 </code> </code>
Line 391: Line 451:
 ssh \ ssh \
     -o KexAlgorithms=+diffie-hellman-group1-sha1 \     -o KexAlgorithms=+diffie-hellman-group1-sha1 \
-    -o HostKeyAlgorithms=+ssh-dss \+    -o HostKeyAlgorithms=+ssh-dss,ssh-rsa \
     -o PubkeyAcceptedKeyTypes=+ssh-rsa \     -o PubkeyAcceptedKeyTypes=+ssh-rsa \
     root@83.149.110.120     root@83.149.110.120
 </code> </code>
 +
 +===== Crittografia SSL =====
 +
 +Con l'aggiornamento delle librerie SSL sembra che alcuni client più datati abbiano problemi a collegarsi al server, ad esempio per quanto riguarda la crittografia dei protocolli SMTP, POP3 e IMAP. In particolare sembra che Outlook 2010 generi un messaggio di errore del tipo **Il server non supporta il tipo di crittografia**. Debian 12 adotta OpenSSL 3.0, con TLS 1.0/1.1 disabilitati nativamente.
  
  
doc/appunti/linux/sa/debian_upgrade_11_12.1742470214.txt.gz · Last modified: by niccolo