php 7 – Warning: Unsupported declare ‘strict_types’ no PHP compilado na versão >=7.2

Um erro está sendo exibido após a implementação do PagSeguro PHP SDK, a instalação foi feita através do git clone e após isso foi sugerido atualizar a mesmo com composer update que também foi feito com sucesso.

Estou implementando a biblioteca em ambiente Linux com Apache2 e PHP v7.3 com todas as extensões PHP solicitadas na documentação.

O erro persiste e tentei de diversas maneiras fazer a correção, trocando a versão do PHP, reiniciando o servidor, mesmo assim de nada adiantou.

Strict Types pelo que sabemos foi introduzida na versão 7 do PHP, teoricamente não deveria se comportar assim, correto?

Alguém pode me dar uma ajuda com isso? Alguém já lidou com esse tipo de erro?

Warning: Unsupported declare ‘strict_types’ in
/home/graandmas/public_html/pagseguro-php-sdk/vendor/phpunit/phpunit/src/Framework/Assert/Functions.php
on line 1

Fiz downgrade na versão do PHP para a versão 7.2, upgrade para a versão 7.4.3 e nada, a biblioteca está ajustada para trabalhar com a versão 7, mas nada está resolvendo.

Warning message at boot: Option ‘size’ missing in crypttab (Ubuntu 20.04)

I am dual booting Ubuntu 20.04 installed with a dedicated home and swap partition. I encrypted both home and swap using encryptfs after install. Since then no issues or whatsoever. After running some updates today I got a warning message at boot stating that:

cryptsetup: WARNING: Option ‘size’ missing in crypttab for plain
dm-crypt mapping root. Please read
/usr/share/doc/cryptsetup/README.initramfs and add the correct ‘size’
option to your crypttab(5).

Following the suggestion in this thread I added the option size=256 to the content of /etc/crypttab:

cryptswap1 UUID=XXXXXXXXXXXXXXX /dev/urandom swap,offset=1024,cipher=aes-xts-plain64,size=256

Didn’t work though, the warning message at boot still persists with no noticable effect to the system.

The output of sudo cryptsetup status /dev/mapper/cryptswap1 is as following:

/dev/mapper/cryptswap1 is active and is in use.
  type:    PLAIN
  cipher:  aes-xts-plain64
  keysize: 256 bits
  key location: dm-crypt
  device:  /dev/sda4
  sector size:  512
  offset:  1024 sectors
  size:    39060480 sectors
  mode:    read/write

I will appreciate some advice here, thanks.

python 3.x – Any solution to Unknown Timezone Warning?

I have a python script to read the news RSS feed and extract the current news. I am using datatime.now() to get the current date and extract the article for the same date. I am now getting this TimeZone Warning, and articles are being extracted for wrong dates. Any solution to overcome this??

UnknownTimezoneWarning: tzname IST identified but not understood. Pass tzinfos argument in order to correctly return a timezone-aware datetime. In a future version, this will raise an exception. warnings.warn(“tzname {tzname} identified but not understood. “

bash – WARNING: git-filter-branch has a glut of gotchas generating mangled history rewrites

I want to clean a large file from my local git repository (and incidentally clean my repository to reduce size). This is my bash:

#!/bin/bash
project="myprojectgit"
bigfile="superbigfile.tar.gz"

cd $project

git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch '"$bigfile"'' --prune-empty --tag-name-filter cat -- --all
git filter-branch --force --index-filter 'git rm -r --cached --ignore-unmatch '"$bigfile"'' HEAD
git clean -nd
git clean -fd
rm -rf .git/refs/original/
git reflog expire --expire=now --all
git gc --prune=now --aggressive

But now show the following warning:

WARNING: git-filter-branch has a glut of gotchas generating mangled history
     rewrites.  Hit Ctrl-C before proceeding to abort, then use an
     alternative filtering tool such as 'git filter-repo'
     (https://github.com/newren/git-filter-repo/) instead.  See the
     filter-branch manual page for more details; to squelch this warning,
     set FILTER_BRANCH_SQUELCH_WARNING=1.

I have always used this bash and have never had a problem. Until now. I guess something changed in git.

I try to replace “git filter-branch” with “git filter-repo” but I get the message:

git: 'filter-repo' is not a git command. Look at 'git --help'.but

what should i fix? thanks

Homebrew’s instructions to update Xcode CLT fail to address warning

Since Catalina, brew doctor has produced the message

Warning: A newer Command Line Tools release is available.

Following the subsequent instructions to

sudo rm -rf /Library/Developer/CommandLineTools
sudo xcode-select --install

has no effect.

How do I make sure that Homebrew recognizes that no newer version of the CLT are available?


HOMEBREW_VERSION: 2.2.17-72-ge4719cb
ORIGIN: https://github.com/Homebrew/brew.git
HEAD: e4719cb6f3207a7aed932dbb9d6f363d6c478cd0
Last commit: 5 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: 221abc864bb25f3c0bfa0b0f0237f426f0a056a3
Core tap last commit: 39 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_DISPLAY: /private/tmp/com.apple.launchd.R94NebSNsk/org.macosforge.xquartz:0
HOMEBREW_EDITOR: /usr/local/bin/bbedit
HOMEBREW_MAKE_JOBS: 4
HOMEBREW_NO_ANALYTICS: set
HOMEBREW_NO_EMOJI: set
CPU: quad-core 64-bit haswell
Homebrew Ruby: 2.6.3 => /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
Clang: 11.0 build 1103
Git: 2.26.2 => /usr/local/bin/git
Curl: 7.64.1 => /usr/bin/curl
Java: 1.8.0_172
macOS: 10.15.4-x86_64
CLT: 11.0.0.0.1.1567737322
Xcode: 11.5
XQuartz: 2.7.11 => /opt/X11

magento2.3 – Magento 2.3 Warning: Declaration of MGS Amp Block Html Topmenu

I get the following error message: Warning: Declaration of MGS Amp Block Html Topmenu :: _ getHtml (Magento Framew
ork Data Tree Node $ menuTree, $ childrenWrapClass, $ limit, Array $ colBrakes
= Array) should be compatible with Magento Theme Block Html Topmenu :: _ getHt
ml (Magento Framework Data Tree Node $ menuTree, $ childrenWrapClass, $ limit,
$ colBrakes = Array) in /var/www/vhosts/fakedomain.com/httpdocs/
app / code / MGS / Amp / Block / Html / Topmenu.php in line 105

I get this error message when I try to run the – bin / magento setup: di: compile command

I'm trying to do this because even after installing the theme when I got to the homepage, an error message appears. These logs say:

The DOMDocument object should be created. "; I: 1; s: 13313:" # 0 /var/www/vhosts/fakedomain.com/httpdocs/vendor/magento/framework/View/Element/UiComponent/Config/Reader.php (95):

Any help would be appreciated.

php error: Warning: mysqli_select_db () expects parameter 1 to be mysqli, string in

Can someone help me with this error in the MySQL database?

Php 7.3 version server

// ==============================
$ _CV (& # 39; registraAuto & # 39;) = true; // Automatically log visits?
$ _CV (& # 39; conectaMySQL & # 39;) = true; // Connect to the MySQL server?
$ _CV (& # 39; initialSession & # 39;) = true; // start the session with a session_start ()?
$ _CV (& # 39; server & # 39;) = & # 39; localhost & # 39 ;; // MySQL server
$ _CV (& # 39; user & # 39;) = & # 39; test & # 39 ;; // MySQL user
$ _CV (& # 39; password & # 39;) = & # 39; password & # 39 ;; // MySQL password
$ _CV (& # 39; bank & # 39;) = & # 39; test & # 39 ;; // MySQL database
$ _CV (& # 39; table & # 39;) = & # 39; Visits & # 39 ;; // Name of the table in which the data is stored
// ==============================
// ======================================
// ~ Do not edit from this point ~
// ======================================
// Check if you need to connect to MySQL
if ($ _CV (& # 39; connectMySQL & # 39;) == true) {
$ _CV (& # 39; link & # 39;) = mysqli_connect ($ _ CV (& # 39; server & # 39;), $ _CV (& # 39; user & # 39;), $ _CV (& # 39; password & # 39;)) or the ("MySQL: Cannot connect to server ("). $ _ CV (& # 39; server & # 39;). ").");
mysqli_select_db ($ _ CV (& # 39; bank & # 39;), $ _CV (& # 39; link & # 39;)) or the ("MySQL: Connection to the database could not be established (". $ _ CV (& # 39; bank & # 39;). ").") ;;
}}
// Check if you need to log in
if ($ _CV (& # 39; initialSession & # 39;) == true) {
session_start ();
}}

?>

Failed to specify the database selection connection

Warning: mysqli_select_db() expects parameter 1 to be mysqli, string given in /home/ogko2exz/public_html/teste.php on line 33

MySQL: A connection to the database could not be established (test).