Categories
General

How to Install Serverless on a Mac ?

Install Node server

brew install node

Install serverless

npm install -g serverless

Configure Serverless

serverless config credentials --provider aws -o --key XXXXXXXXXXXXXXXXX --secret XXXXXXXXXXXXXXXXXX

Serverless Login

serverless login

Serverless Deploy

serverless deploy


Categories
Technical

brew Error: Directory not empty @ dir_s_rmdir – /private/tmp/d20210315-27447-1b2auy5

chown davidr:wheel /private/tmp/

fixed my issue

Categories
BEST PHP CODE

Force PHP ERRORS

ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
error_reporting(E_ALL);
Categories
General

Install Node NPM on mac

brew install node

Categories
General

REDIS LARAVEL ConnectionException Error while reading line from the server.

Redis connection issue laravel Fix due to SSL read error on connection

Database config: config/database.php

'redis' => [
        'client' => 'predis',
        'cluster' => false,

        'default' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 0,
        ],
        'cache' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 1,
        ],
        'queue' => [
            'scheme'   => env('REDIS_SCHEME', 'tls'),
            'host'     => env('REDIS_HOST', 'localhost'),
            'password' => env('REDIS_PASSWORD', null),
            'port'     => env('REDIS_PORT', 6379),
            'database' => 2,
        ],
        'options' => [
            'parameters' => [
                'password' => env('REDIS_PASSWORD', null),
            ],
        ],
    ]
Categories
REDIS

Redis MAC

brew update
brew install redis

To Start

brew services start redis

to stop 

brew services stop redis

Or, if you don’t want/need a background service you can just run:

redis-server /usr/local/etc/redis.conf

Test if Redis server is running.

redis-cli ping

If it replies “PONG”, then it’s good to go!

Location of Redis configuration file.

/usr/local/etc/redis.conf

Uninstall Redis and its files.

brew uninstall redis
rm ~/Library/LaunchAgents/homebrew.mxcl.redis.plist
Categories
Technical

How to fix ? Symfony\Component\Debug\Exception\FatalErrorException Declaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs)

How to fix ?

Symfony\Component\Debug\Exception\FatalErrorExceptionDeclaration of Doctrine\DBAL\Driver\PDOConnection::query() must be compatible with PDO::query(string $query, ?int $fetchMode = null, mixed …$fetchModeArgs)

#1 – I removed from composer.json the following line

"doctrine/dbal": "^2.10",

#2 – Run composer upgrade

#3 – Run composer upgrade

Voila Job Done !

Categories
Technical

How to switch PHP version on a mac with brew?

$ brew unlink [email protected] 

$ brew install [email protected]
$ brew link [email protected] --force --overwrite
Categories
General

How to save (control + s ) file and send [sftp,ftp] to web server – PHPStorm


Categories
Database

MACos DBeaver configuration connection backup Json

On OSX (Mac) here:

/Users/${USER}/Library/DBeaverData/workspace6/General/.dbeaver/