doc:appunti:linux:sa:debian_upgrade_11_12
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| doc:appunti:linux:sa:debian_upgrade_11_12 [2025/03/03 16:32] – [pnp4nagios] niccolo | doc: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' | Con l' | ||
| + | |||
| + | ==== 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-> | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | 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-> | ||
| + | } | ||
| + | } | ||
| + | </ | ||
| + | |||
| + | ==== PHP dbConnect-> | ||
| + | |||
| + | Con le versioni precedenti di PHP era possibile usare una sintassi del tipo: | ||
| + | |||
| + | <code php> | ||
| + | $stmt = $this-> | ||
| + | if ($stmt) { | ||
| + | // Do something | ||
| + | } | ||
| + | $stmt = $this-> | ||
| + | </ | ||
| + | |||
| + | Con il nuovo PHP è necessario chiudere il primo statement prima di aprirne uno nuovo, altrimenti si ottiene l' | ||
| + | |||
| + | < | ||
| + | PHP Fatal error: | ||
| + | you can't run this command now in / | ||
| + | </ | ||
| + | |||
| + | La soluzione è chiudere lo statement prima di aprirne un altro: | ||
| + | |||
| + | <code php> | ||
| + | $stmt = $this-> | ||
| + | if ($stmt) { | ||
| + | // Do something | ||
| + | $stmt-> | ||
| + | } | ||
| + | $stmt = $this-> | ||
| + | </ | ||
| ===== SpamAssassin ===== | ===== SpamAssassin ===== | ||
| Line 125: | Line 181: | ||
| ===== OpenVPN BF-CBC not supported ===== | ===== OpenVPN BF-CBC not supported ===== | ||
| - | L' | + | ==== Configuration with --secret PSK ==== |
| - | L' | + | In a configuration with PSK (**%%--secret%%** option) the **%%--cipher%%** parameter selects the cipher to use on the data channel. The default setting would be **BF-CBC**, |
| + | |||
| + | < | ||
| + | # Do not use the default BF-CBC cipher, it was removed because of its 64-bit block size. | ||
| + | cipher AES-256-CBC | ||
| + | # Get the PSK from the external file. | ||
| + | secret my-openvpn-secret.key | ||
| + | </ | ||
| + | |||
| + | Of course, the other end of the VPN must support the same encryption. **WARNING**: | ||
| + | |||
| + | ==== Configuration with TLS ==== | ||
| + | |||
| + | With OpenVPN 2.6.x the **%%--cipher%%** option should not be used any longer in TLS mode (e.g. when using EasyRSA). | ||
| + | |||
| + | With OpenVPN 2.4.x or lower: The values declared into the %%--cipher%% option were appended to **%%--data-ciphers%%** for compatiblity, | ||
| < | < | ||
| - | # The --cipher option | + | # The --cipher option |
| - | # Notice that AES-256-GCM is not supported | + | |
| #cipher AES-256-CBC | #cipher AES-256-CBC | ||
| - | # | + | # Use --data-ciphers |
| - | # Newer connections using TLS uses the --data-ciphers | + | data-ciphers AES-256-GCM: |
| - | data-ciphers AES-256-GCM: | + | # 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 | ||
| </ | </ | ||
| + | |||
| ===== PostgreSQL da 13 a 15 ===== | ===== PostgreSQL da 13 a 15 ===== | ||
| Line 276: | Line 349: | ||
| ==== pnp4nagios ==== | ==== pnp4nagios ==== | ||
| - | Se è installato il plugin **pnp4nagios** versione **0.6.26** è necessario fare l' | + | Se su Debian 11 era installato il plugin **pnp4nagios** versione **0.6.26** è necessario fare l' |
| < | < | ||
| Line 283: | Line 356: | ||
| </ | </ | ||
| - | infatti la costante | + | infatti la costante |
| Si può installare **pnp4nagios-0.6.27-5** che risolve questa incompatibilità. Download da [[https:// | Si può installare **pnp4nagios-0.6.27-5** che risolve questa incompatibilità. Download da [[https:// | ||
| Line 378: | Line 451: | ||
| ssh \ | ssh \ | ||
| -o KexAlgorithms=+diffie-hellman-group1-sha1 \ | -o KexAlgorithms=+diffie-hellman-group1-sha1 \ | ||
| - | -o HostKeyAlgorithms=+ssh-dss \ | + | -o HostKeyAlgorithms=+ssh-dss, |
| -o PubkeyAcceptedKeyTypes=+ssh-rsa \ | -o PubkeyAcceptedKeyTypes=+ssh-rsa \ | ||
| root@83.149.110.120 | root@83.149.110.120 | ||
| </ | </ | ||
| + | |||
| + | ===== Crittografia SSL ===== | ||
| + | |||
| + | Con l' | ||
doc/appunti/linux/sa/debian_upgrade_11_12.1741015976.txt.gz · Last modified: by niccolo
