Hongmu Notes
Home Summary of pitfalls How to change the PHP version used by Composer on Linux?
Summary of pitfalls

How to change the PHP version used by Composer on Linux?

How to change the PHP version used by Composer on Linux?

While using Composer, I suddenly realized that the package required a higher version of PHP, so I looked up some information.

Since I am using the Pagoda Panel, the specific modifications are as follows:

Login Terminal

Check the current version of Composer being used.

ls -l /usr/bin/php

The returned result indicates version 7.2.

lrwxrwxrwx 1 root root 26 10月 18 2021 /usr/bin/php -> /www/server/php/72/bin/php

Updated to version 7.4

ln -sf /www/server/php/74/bin/php /usr/bin/php

View modification results

ls -l /usr/bin/php

Return result:

/usr/bin/php -> /www/server/php/74/bin/php

This has been updated to PHP 7.4.

With attached image

ad1a1b7183182603

 

微信赞赏

WeChat

支付宝赞赏

Alipay

✍️ Author: Hong Mu

webmaster · Thanks for reading, stay tuned for more exciting content

Author homepage View home page →

Related articles

Browser caching increases the speed of secondary visits to your website

Browser caching increases the speed of secondary visits to your website Summary of pitfalls

Use browser caching of official words: If users will visit your website multiple times, browser caching of static resources can save users time. Cache headers should be applied to all cacheable static resources, not just to a small subset of static resources (for example, images). Cacheable resources include JS and CSS files, image files, and other binary object files (media files, PDF files, etc.). Normally, HTML doesn’t…
👁 202

Recommended reading

Do you have any good suggestions for developing an MVC framework in PHP?

Do you have any good suggestions for developing an MVC framework in PHP? Summary of pitfalls

Developing an MVC framework requires considering the following aspects: Design patterns: The MVC pattern is an important design pattern; however, other design patterns—such as the Factory Pattern and the Singleton Pattern—should also be taken into account. Routing system: Design a simple and user-friendly routing system that makes it easy for users to define routing rules and parameters. Database operations: Design an intuitive database operation class that supports multiple database types, such as MySQL, PostgreSQL, and so on.
👁 184
(Adaptive mobile version) PBootCMS template for battery-powered energy-related websites; Download source code for energy technology product websites – 0575

(Adaptive mobile version) PBootCMS template for battery-powered energy-related websites; Download source code for energy technology product websites – 0575 Practical Collection pbootcms Template

A battery and energy technology product – PbootCMS website template, compatible with both PC and WAP devices. The modern, industrial design is ideal for showcasing batteries, energy storage products, and energy solutions. It enables new energy enterprises to present their products online and attract customers from the power and telecommunications industries. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin | Extraction Password: www.4s5.c...
👁 34
Web Design & Website Development Templates – 0601

Web Design & Website Development Templates – 0601 Practical Collection Yiyou template

This EyouCMS template is ideal for the web design and website development industry. Its modern and creative design style makes it perfect for showcasing design portfolios, website development projects, web services, and customer testimonials. It helps web service providers demonstrate their professional expertise online and attract corporate clients. Template Overview | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for EyouCMS | EyouCMS...
👁 40
Practical Tool: Nginx Website Log Analysis

Practical Tool: Nginx Website Log Analysis Practical Collection Utility tools

As the name suggests, this is a simple log analysis tool that can extract specific information from your website's logs! Step 1: Place the log file and the tool in the same directory. Place the Log file (Nginx website logs) into the program's directory, or copy/move the program to the directory where the log file is located. Step 2: Modify the log file name. Change the website log file name to `rizhi.log`; otherwise, the program will fail to operate...
👁 183
(PC+WAP) Embroidery Website – PBootCMS Template; Download Source Code for Traditional Handicrafts Websites – 0576

(PC+WAP) Embroidery Website – PBootCMS Template; Download Source Code for Traditional Handicrafts Websites – 0576 Practical Collection pbootcms Template

A PbootCMS website template designed for the embroidery, needlework, and traditional handicraft industries, supporting access via both PC and WAP devices. Its classical and elegant design effectively showcases the aesthetic beauty and cultural heritage of embroidery craftsmanship. This template helps traditional handicraft businesses showcase their products online, preserve their craft traditions, and expand their market reach. Template Display | Installation Instructions | Website Backend: /admin.php | Username: admin | Password: admin
👁 44
Legendary Competitive Gaming Website Template 0602

Legendary Competitive Gaming Website Template 0602 Practical Collection Yiyou template

An eYouCMS template designed for Legend of Mir-style competitive gaming websites. Its dynamic, tech-driven design is ideal for showcasing Legend of Mir-related news, competitive events, gameplay guides, and player communities. This template helps Legend of Mir gaming websites attract players online and build brand influence. Template Display | Installation Instructions | Website Backend: /login.php | Username: admin | Password: admin | Related Articles: Summary of Common Installation Issues for eYouCMS | eYouCMS...
👁 33