暫時性排除 laravel 在 php7.2 上產生的 count() 錯誤

Disable warning in error_reporting and edit handleError function to not throw error.

vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/HandleExceptions.php:56

public function handleError($level, $message, $file = '', $line = 0, $context = [])
{
    if (error_reporting() & $level) {
        if (strpos($message, 'Parameter must be an array or an object that implements Countable') !== false)
        {
            return;
        }
        throw new ErrorException($message, 0, $level, $file, $line);
    }
}

 

Linux – 使用 SSH 登入

使用 puttygen 產生 4096 bits 的 public/private key 一對

mkdir ~/.ssh
chmod 0700 ~/.ssh
touch ~/.ssh/authorized_keys
chmod 0644 ~/.ssh/authorized_keys
sudo vi ~/.ssh/authorized_keys
sudo vi /etc/ssh/sshd_config
[...]
PasswordAuthentication no
[...]
UsePAM no
[...]
sudo reload ssh