Skip to content

Instantly share code, notes, and snippets.

View xyluz's full-sized avatar
🙃

Seyi Onifade xyluz

🙃
View GitHub Profile
@xyluz
xyluz / ubuntuerror.md
Created May 21, 2021 13:35
Solved: Weird Ubuntu Server Errors/Warning Messages During Update / Upgrade

A few times I have gambled with online scripts while working on a server. Recently (today actually) I wanted to upgrade my PHP version from 7.0 to 7.1. After trying out the normal upgrade command, it didn’t work.

A few minutes of Googling and I completely messed up my server… not like the server went down or anything, but I get these weird error messages at the end of sudo apt-get update && sudo apt-get upgrade something like:

W: GPG error: http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease: The following signatures couldn’t be verified because the public key is not available: NO_PUBKEY 4F4EA0AAE5267A6C
W: The repository ‘http://ppa.launchpad.net/ondrej/php/ubuntu xenial InRelease’ is not signed.
N: Data from such a repository can’t be authenticated and is therefore potentially dangerous to use.
N: See apt-secure(8) manpage for repository creation and user configuration details.`
@xyluz
xyluz / deploylarqavel.md
Created May 21, 2021 13:30
Deploying Laravel to a Shared Hosting with SSH

You need to have SSH access to your server, Its almost impossible and definitely unadvisable to deploy Laravel to a server with a file upload app like filezilla, for a lot of reasons, but mostly because of dependencies.

The first thing you need to check is; if your host server gives you access to SSH.

After checking with your host company, and ensuring you have SSH access, you can now install Laravel on your local machine, if you don’t know how to do that, check this: https://medium.com/staybusyng/getting-started-with-laravel-69d288229de8

Steps to Deloying your Laravel App

STEP 1: Use Git

@xyluz
xyluz / phpunit.md
Last active May 21, 2021 13:01
PHPUnit + CakePHP Error

If you come across this, know that I spent hours trying to figure out what the problem was, and I am putting it out there to help others. It’s going to be short, and most likely uninteresting.

I was working on a small app, my tests were running well, except when I used assertEqualsI so I decided to use assertIdentical as an alternative for those tests that required Equal, basically, Equal is == while identical is === so, they could work interchangeably, just that you have to change the data type to get the desired result, a silly thing to do by the way (just putting it out there).

Anyway, this was the error:

Error: Declaration of PHPUnit_Framework_Comparator_DOMDocument::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false) must be compatible with PHPUnit_Framework_Comparator_Object::assertEquals($expected, $actual, $delta = 0, $canonicalize = false, $ignoreCase = false, array &$processed = Array)

I was working with: