1. Download PHP 8.0

image.png

Enter /Applications/MxSrvs/bin under the main program path of MxSrvs, according to the naming rules of Mxsrvs, create a php_8.0.16 folder to store our compiled files

There are two ways to enter the directory:

  1. Click the small icon in the status bar of the MxSrvs tool -> locate the directory -> the main program directory -> double-click to enter the bin folder
    image.png

  2. Open Finder -> Applications -> Search for MxSrvs on the right -> Double-click to enter MxSrvs -> Double-click to enter the bin folder
    image.png

2. Compilation starts

Unzip the downloaded file and get the [php-8.0.16] folder

image.png

Compile command:

./buildconf --force./configure --prefix=/Applications/MxSrvs/bin/php_8.0.16 \--with-config-file-path=/Applications/MxSrvs/bin/php_8.0.16/etc \--with -mysqli=mysqlnd \--with-pdo-mysql=mysqlnd \--with-pear \--with-zlib \--with-curl \--enable-mysqlnd \--enable-pdo \--enable-fpm \--enable-cli \--without-iconv sudo make && sudo make installsudo cp php.ini-development /Applications/MxSrvs/bin/php_8.0.16/etc/php.ini

After the compilation is finished, you need to enter the (computer) password twice during compilation, because sudo is used
Generally, when installing, you will not encounter too many missing components and the like. If you are missing something, you can basically install what is missing.

brew install xxxx

Then compile it again

3. Adapt to MxSrvs

We restart the MxSrvs tool. At this time, we can see the PHP version we edited. Switch to 8.0.16. At this time, clicking the start button cannot start.

  1. Replace the configured folder name php_8.0.16 with php when compiling, because MxSrvs will change the current switching version directory to php when you switch the PHP version
  2. Copy the file php-fpm.conf.default in the /Applications/MxSrvs/bin/php/etc directory to the current directory and rename it to php-fpm.conf, and /Applications/MxSrvs/bin/php/ Copy www.conf.default under etc/php-fpm.d to the current directory and rename it to www.conf
  3. It is also an important step. We need to compare the configuration file /Applications/MxSrvs/bin/php/etc/php.ini of the PHP version we edited with the pph.ini of the version provided by MxSrvs line by line, and then modify it to the corresponding corresponding configuration

At this time, it can basically be said that all the work has been done and the results can be enjoyed.

image.png

Likes(1)

Comment list count 0 Comments

No Comments