Jump to content

Search the Community

Showing results for tags 'steve b'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • Informatii generale
    • Anunturi importante
    • Bine ai venit
    • Proiecte RST
  • Sectiunea tehnica
    • Exploituri
    • Challenges (CTF)
    • Bug Bounty
    • Programare
    • Securitate web
    • Reverse engineering & exploit development
    • Mobile security
    • Sisteme de operare si discutii hardware
    • Electronica
    • Wireless Pentesting
    • Black SEO & monetizare
  • Tutoriale
    • Tutoriale in romana
    • Tutoriale in engleza
    • Tutoriale video
  • Programe
    • Programe hacking
    • Programe securitate
    • Programe utile
    • Free stuff
  • Discutii generale
    • RST Market
    • Off-topic
    • Discutii incepatori
    • Stiri securitate
    • Linkuri
    • Cosul de gunoi
  • Club Test's Topics
  • Clubul saraciei absolute's Topics
  • Chernobyl Hackers's Topics
  • Programming & Fun's Jokes / Funny pictures (programming related!)
  • Programming & Fun's Programming
  • Programming & Fun's Programming challenges
  • Bani pă net's Topics
  • Cumparaturi online's Topics
  • Web Development's Forum
  • 3D Print's Topics

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Yahoo


Jabber


Skype


Location


Interests


Biography


Location


Interests


Occupation

Found 1 result

  1. Introduction Out of the box, our default CLI PHP version is set to PHP 7.4. In the near future, this will be updated to be 8.0 out of the box. This change will take place automatically, and so will future updates. For most GridPane users, you can leave our defaults and stop reading right now. For a few of you though, you may come across a situation where you need to change our defaults to a higher or lower version of PHP, and this article will walk you through how to make this change and set it so that our systems don’t automatically update it in the future. TABLE OF CONTENTS CLI PHP vs Website PHP Getting Started Checking Your CLI PHP Version Changing Your CLI PHP Version CLI PHP vs Website PHP Before we begin, it’s important to understand the CLI PHP version, and the version of PHP that your individual websites run on is not the same thing. Updating your website’s PHP version will not solve any issues that arise from scripts/software that does not support your current CLI version of PHP. WHAT IS PHP CLI? PHP CLI is PHP’s Command Line Interface, and it allows PHP to be executed from the server command line. A REAL WORLD EXAMPLE: COMPOSER Most programs have a minimum PHP requirement. Back in the days when 7.2 was our default CLI PHP version, Composer made an update that required a minimum of PHP 7.3. This caused problems not just with Composer but other programs as well – here’s an example of an error from a site where SSO was failing to generate a login link: Your Composer dependencies require a PHP version ">= 7.3.0". You are running 7.2.25-1+ubuntu18.04.1+deb.sury.org+1. Error Code: 100 | PHP Errors stopping SSO Link creation, please check logs.... Here Composer is using the CLI PHP version and not the FPM/LSPHP version that is used by your websites. Switching the website PHP version of your sites would, therefore, not fix this issue. Updating the CLI PHP version to 7.3 fixed the above SSO errors and allowed Composer to once again function correctly. Getting Started To make this change, you will first need to SSH into your server. Once connected, the rest is simply a copy-and-paste exercise following our steps below. Please see the following guides to get started: Step 1. Generate your SSH Key Step 2. Add your SSH Key to GridPane (also see Add default SSH Keys) Step 3. Connect to your server by SSH as Root user (we like and use Termius) Checking Your CLI PHP Version To check your CLI PHP version, you can run the following command: sudo update-alternatives --display php This will output the following, only with the correct PHP version should your setting be different: root@servername:~# sudo update-alternatives --display php php - manual mode link best version is /usr/bin/php8.1 link currently points to /usr/bin/php7.4 link php is /usr/bin/php slave php.1.gz is /usr/share/man/man1/php.1.gz /usr/bin/php7.3 - priority 73 slave php.1.gz: /usr/share/man/man1/php7.3.1.gz /usr/bin/php7.4 - priority 74 slave php.1.gz: /usr/share/man/man1/php7.4.1.gz /usr/bin/php8.0 - priority 80 slave php.1.gz: /usr/share/man/man1/php8.0.1.gz /usr/bin/php8.1 - priority 81 slave php.1.gz: /usr/share/man/man1/php8.1.1.gz root@servername:~# Changing Your CLI PHP Version on Nginx or OpenLiteSpeed STEP 1. SET YOUR PREFERRED CLI PHP VERSION Run the following command to change the PHP CLI version: sudo update-alternatives --set php /usr/bin/phpX.X X.X = the version number, for example: 7.4, 8.0, 8.1. For example: sudo update-alternatives --set php /usr/bin/php7.4 STEP 2. MAKE THE CHANGE PERSIST Our systems check for a token file for the CLI PHP version. If it’s not present, your changes will be reverted. Create the token file with: /root/preferred_php_cli.version Add the PHP version – number only. For example: 7.4 Now save the file with CTRL+O followed by Enter. Exit nano with CTRL+X. Source
×
×
  • Create New...