Home  >  Article  >  System Tutorial  >  Configure PHP environment and change PHP version on Mac OS (using PHPStorm)

Configure PHP environment and change PHP version on Mac OS (using PHPStorm)

王林
王林forward
2024-01-27 08:21:09948browse

php editor Yuzai will introduce you in detail how to change the PHP version on Mac and how to configure the PHP environment. When developing with PHPStorm, it is very important to ensure that the correct PHP version is configured. With simple steps, you can easily switch to the desired PHP version to suit different project needs. Next, we will teach you how to operate step by step to make your PHP development more efficient and smooth.

Detailed tutorial on installing, using and uninstalling brew on Apple Mac computers

1. First, click on the [Launch Pad] icon on the left as pointed by the arrow in the picture below. 2. Then, find the [Other] folder in the pop-up menu bar and click it, as shown by the arrow in the figure below. 3. Finally, after opening the folder, click the [Terminal] icon at the location shown in the picture below.

Open Finder and select the application. Find Utilities in Applications and click Terminal.

3. Copy the content to the clipboard ruby ​​-e $ (curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall) After the uninstallation is complete, try installing again.

The php version is too high, please modify the php version (it can be changed to about 5.6 or 7.0, not more than 8.0...

This is a prompt message, meaning the currently used PHP version Higher, it is recommended to lower the PHP version to 6 or a version close to 0. This is because some old PHP applications may not be compatible with newer PHP versions and need to use older versions to run.

Enter the Wamp installation directory/bin/php/php17 directory, copy a copy from php.ini-dist or php.ini-recommended, rename it to php.ini, adapt to modify the php.ini configuration (such as extension_dir), and then copy it from php. Make a copy of .ini and rename it to phpForApache.ini.

You don't need to remove PHP 1, just simply switch the PHP version to default for Apache and the command line. For example, if your server has There are two versions of PHP 1 and PHP 6. The following examples will help you switch between the two versions.

Depending on the environment you are using, Apmserv6 should be enough to meet your needs. If you still have problems , you can try to download the latest version of wampserv, which can solve the problem of PHP version. Most of the DreamWeaver templates can run successfully in these two environments.

First of all, if you delete PHP 6 and want To use PHP version 0, you need to install PHP 0 and add PHP's bin directory to the environment variables. Please note that the environment variables are set differently on Windows and Linux. Please find the corresponding tutorial by yourself.

Double-click the left mouse button to open [Website Building Assistant], click [Environment Detection], check [Install fastcgi components] and [Install php3], and then click [Start Processing]. Note: The installation method for other higher versions is the same.

mac更改php版本(phpstorm配置php环境 mac os)

How to quickly switch between multiple php versions under mac

You can simply switch the php version to default for Apache and command line. For example, your server has two versions of PHP 1 and PHP 6 installed. Now the following example will help you switch between the two versions.

Use npm to install dependent third-party packages during the vue development process , but different versions of npm maintain packages in different ways. After updating node, old projects are prone to being unable to install packages and cannot run, so multiple versions of node are required.

MAC comes with Apache, first determine the current HTTP The server is indeed nginx. Nginx is generally used in conjunction with PHP-fpm. They are independent and interact through the local network in accordance with the FastCGI standard protocol.

Really pure green, integrated VC does not need to be installed separately, just download and unzip it to use. It can run multiple PHP versions at the same time, customize the PHP version at will, and switch between more than 700 PHP versions at will.

If you are still not satisfied, you can customize any PHP version and switch between 700 PHP versions at your leisure. This tutorial article provides more than 700 PHP versions for download. (Switch 700 PHP versions with one click) Baidu search for the title of this article: How to customize the PHP version in the PHP integrated environment and run multiple PHP versions at the same time to open the module with one click.

First, if you removed PHP 6 and want to use version 0 of PHP, you need to install PHP 0 and add PHP's bin directory to your environment variables. Please note that the environment variables are set differently in Windows and Linux, please find the corresponding tutorial by yourself.

Conclusion: The above is all the content about changing the php version on mac that this site has compiled for you. Thank you for taking the time to read the content of this site. I hope it will be helpful to you. For more related content, don’t forget to check out Search this site.

The above is the detailed content of Configure PHP environment and change PHP version on Mac OS (using PHPStorm). For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:shouxicto.com. If there is any infringement, please contact admin@php.cn delete