changer version de php dans Ubuntu

How to Install PHP 5.6, PHP 7.3 on Ubuntu 18.04 & 16.04 using PPA

Thanks to Ondřej Surý for maintaining PPA of latest PHP5 versions on launchpad. If you want to install the specific version of PHP, then this article can be helpful for you. This article will help you for installing PHP 5.6 or PHP 7.3 using PPA on Ubuntu 18.04 LTS, 16.04 LTS, 14.04 LTS or 12.04 LTS systems. If you have already had a higher version installed on your system and you need to install lower version, then you have to remove higher version first and remove the apt repository from the system.

Install PHP 5.6 on Ubuntu

Use the following set of commands to enable PPA for PHP 5.6 in your Ubuntu system and install PHP 5.6.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6

Check Installed PHP Version:

php -v 

PHP 5.6.40-10+ubuntu16.04.1+deb.sury.org+1 (cli)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

Install PHP 7.3 on Ubuntu

Use the following set of command to add PPA for PHP 7.3 in your Ubuntu system and install PHP 7.3.

sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3

Check Installed PHP Version:

php -v 

PHP 7.3.9-1+ubuntu16.04.1+deb.sury.org+1 (cli) (built: Sep  2 2019 12:54:04) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.9, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.9-1+ubuntu16.04.1+deb.sury.org+1, Copyright (c) 1999-2018, by Zend Technologies

Switch Between PHP Version’s

If you have installed multiple PHP versions and want to use differently than the default. Use the following steps to switch between php5.6 and php7.3 version. You can use the same command for other PHP versions.

From PHP 5.6 => PHP 7.3

Apache:-

sudo a2dismod php5.6
sudo a2enmod php7.3
sudo service apache2 restart

CLI:-

sudo update-alternatives --set php /usr/bin/php7.3
sudo update-alternatives --set phpize /usr/bin/phpize7.3
sudo update-alternatives --set php-config /usr/bin/php-config7.3

From PHP 7.3 => PHP 5.6

Apache:-

sudo a2dismod php7.3
sudo a2enmod php5.6
sudo service apache2 restart

CLI:-

sudo update-alternatives --set php /usr/bin/php5.6
sudo update-alternatives --set phpize /usr/bin/phpize5.6
sudo update-alternatives --set php-config /usr/bin/php-config5.6

Reprend la vie

2020-09-08

Ça fait 3 mois que je me suis perdu, il me faut reprendre la courage et l’espoir !

Un programme à faire pour un an.

Ce soir j’ai besoin de bien réfléchie !

 

 

 

 

React

1 : la cycle de vie :

https://blog.hhking.cn/2018/09/18/react-lifecycle-change/

note sur mongo DB

Installation dans ubuntu :

https://docs.mongodb.com/manual/tutorial/install-mongodb-on-ubuntu/

installer studio 3T:

https://studio3t.com/knowledge-base/articles/installation/#install-studio-3t

d’autres outils:

https://www.guru99.com/top-20-mongodb-tools.html

*********************************************************************************

les commands utils

show dbs, show databases

use db-lyu

db : afficher la base actuelle

show collections

mongoose :

connection :fsdfs

mongoose.connect('mongodb://localhost/test', {useNewUrlParser: true});
const db = mongoose.connection;
db.once('open', function() {
  // we're connected!
});

note sur git

git init

git add

git commit -m “xxxx”

git log –oneline

git reflog

git reset –head xxxxxx

git reset –head HEAD^^^ (reculer 3 étapes)

git reset –head HEAD~3 (reculer 3 étapes)

git reset –soft xxxxx (seulement changer index de repose)

git reset –mix xxxxx (change index de repos et la cache)

git diff

git remote add xxxx https://github.com/yujunjie0603/vue3-game-plan.git

git clone

git fetch

git pull

pull = fetch + merge

git merge