Home Operation and Maintenance phpstudy PhpStudy installs PHP8 [detailed graphic and text explanation]

PhpStudy installs PHP8 [detailed graphic and text explanation]

Mar 02, 2021 pm 12:02 PM
php8 phpstudy

"

This article mainly installs PHP8 for phpstudy and uses it normally

"

Article Directory

Preface

1. Install PHP8

2. Run PHP8 error handling

3. Perfect combination of phpstudy and PHP8

4. Summary

##Foreword

In the above article "

PHP8 New Feature Interpretation (Development Code Example Demonstration) " explains the new features of PHP8. Due to the need for code demonstration, the PHP8 source code needs to be installed.

For the sake of convenience, it is not built on Linux, so the phpstudy inheritance environment is used directly.

Although the code in that article can run normally, the extensions inside are not turned on.

Next, Kaka will take you step by step to implement phpstudy integration with PHP8

Note: The above is a manual DIY, which is a bit troublesome. For this reason, php Chinese website developed An integrated environment tool that supports php8 is specially designed for learning and using PHP Chinese website. Download address: https://www.php.cn/xiazai/gongju/1532

1. Install PHP8

Download addresshttps://windows.php.net/download #php-8.0

PhpStudy installs PHP8 [detailed graphic and text explanation]
Select the first download

After the download is completed, unzip the file and create the storage directory as php8

We all know that the installation directory of phpstudy is installed directly on the D drive in the new version, so as long as you do not modify the installation directory, all installation directories will be consistent.

This does provide great convenience for writing a group of articles, because everyone’s installation location is the same, which saves a lot of trouble.

Next, place the downloaded and decompressed PHP8 into the total PHP directory of phpstudy

PhpStudy installs PHP8 [detailed graphic and text explanation]
PHP8 storage directory

At this time you can Have fun playing.

The PHP version must be modified here!

PhpStudy installs PHP8 [detailed graphic and text explanation]
Modify the PHP8 environment

2. Run PHP8 error handling

Some partners may encounter the following errors when installing PHP8.

The Kaka test is that this error will not occur in the win10 professional version, but an error will occur in the win10 home version.

If you complete the first step and restart the environment, you find that PHP cannot run or an error 502 is reported.

Then you directly cmd to D:\phpstudy_pro\Extensions\php\php8.0.2ntsThis location executes php -v

If found The following error occurredPHP Warning: 'C:\Windows\SYSTEM32\VCRUNTIME140.dll' 14.0 is not compatible with this PHP build linked with 14.28 in Unknown on line 0

Enter to this URL https://www.yuque.com/u30882/rx39g7/kns2a2, Kaka has downloaded the software, just click in and download it directly.

You need to restart your computer after the download is complete.

Then you can run PHP8 perfectly

3. Perfect combination of phpstudy and PHP8

After the first and second steps, the environment has been set up and the PHP file can also be run.

But this is the only way to run PHP files. At this time, MySQL cannot be connected.

That’s because we downloaded PHP8 ourselves, and all the extensions and configuration information in it have not been modified.

So the problem is that all the extensions in the PHP8 configuration file I downloaded are turned off.

At this time, you need to enable the corresponding extensions one by one. If you don’t know what extensions you need to enable.

Open your phpstudy and click on the website. There is management on the right, see what extensions were enabled in the previous PHP environment, and then follow the example

Here All of them have been opened by Kaka.

PhpStudy installs PHP8 [detailed graphic and text explanation]
PHP8 extension

You can open them one by one at the locations in the picture below, or you can modify them directly in the php.ini file, just change # Just remove the comment in front of ##extension.

PhpStudy installs PHP8 [detailed graphic and text explanation]Open directly in the php.ini file
For example, if you need to open curl, just remove the

; in front.

PhpStudy installs PHP8 [detailed graphic and text explanation]Open the extension
You will find that after opening these extensions according to the previous PHP environment, you will find that there is still no check in the extension of the panel. .

But I’ve obviously turned it on! Why is the extension still not opened?

Don’t worry, still go to the php.ini file, search for such a word

extension_dir, and then modify the extension location

PhpStudy installs PHP8 [detailed graphic and text explanation] Modify the extension location
Restart your PHP environment, and then test it. The test in this article uses tp6

The test code is to query the data of the database, provided that you configure the database information OK! I won’t write it here

PhpStudy installs PHP8 [detailed graphic and text explanation]
Query data
PhpStudy installs PHP8 [detailed graphic and text explanation]
Return results

4. Summary

At this point, the integration of phpstudy with PHP8 is considered complete and more testing can be invested.

Here are some points to note

  • Be sure to restart the environment after modifying the configuration file
  • I don’t know how to open it What extension, open your original phpstudy and follow the example
  • Be sure to modify the extension directory after opening the extension
  • When running php -v, an error message is reported See if it’s the same as Kaka

Persistence in learning, persistence in blogging, and persistence in sharing are the beliefs that Kaka has always upheld since his career. Hope In the huge Internet, Kaka’s articles can bring you a little bit of help. I am Kaka, see you in the next issue.

The above is the detailed content of PhpStudy installs PHP8 [detailed graphic and text explanation]. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
1 months ago By 尊渡假赌尊渡假赌尊渡假赌
Two Point Museum: All Exhibits And Where To Find Them
1 months ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

How to add mysql extension to php8 How to add mysql extension to php8 Oct 07, 2023 pm 03:31 PM

The steps to add mysql extension to php8 are: 1. Install the MySQL client library; 2. Install the development tools for PHP 8; 3. Download the MySQL extension source code; 4. Compile and install the MySQL extension; 5. Enable the MySQL extension; 6. Restart Just a web server.

What is the difference between php5 and php8 What is the difference between php5 and php8 Sep 25, 2023 pm 01:34 PM

The differences between php5 and php8 are in terms of performance, language structure, type system, error handling, asynchronous programming, standard library functions and security. Detailed introduction: 1. Performance improvement. Compared with PHP5, PHP8 has a huge improvement in performance. PHP8 introduces a JIT compiler, which can compile and optimize some high-frequency execution codes, thereby improving the running speed; 2. Improved language structure, PHP8 introduces some new language structures and functions. PHP8 supports named parameters, allowing developers to pass parameter names instead of parameter order, etc.

Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0 Detailed graphic explanation of the installation and configuration method of apache2.4+php8.0 Dec 06, 2022 pm 04:53 PM

This article will introduce to you how to install apache2.4 and how to configure php8.0. The article is accompanied by pictures and detailed steps. Let's take a look at how to install and configure apache2.4+php8.0~

How to convert php8 data types How to convert php8 data types Nov 16, 2023 pm 02:51 PM

The methods of the php8 data type include converting strings to integers, converting integers to strings, converting strings to floating point numbers, converting floating point numbers to strings, converting arrays to strings, converting strings to arrays, and converting Boolean values ​​to integers. Integer conversion to Boolean value and variable type determination and conversion. Detailed introduction: 1. Converting a string to an integer includes the intval() function and (int) forced type conversion; 2. Converting an integer to a string includes the strval() function and (string) forced type conversion; 3. Converting a string to a float Points and so on.

How to install phpstudy pro How to install phpstudy pro Apr 02, 2024 pm 03:15 PM

PHPstudy Pro is a web development environment software package that enables rapid deployment and testing of web applications. The installation steps are as follows: Download the installation package from the official website. Run the installer and select the installation path and language. After the installation is complete, launch PHPstudy and configure PHP, MySQL, Apache settings. To verify the installation, enter "localhost" in your browser or run the command "php -v" to check the PHP version.

What to do if phpstudy is garbled What to do if phpstudy is garbled Nov 14, 2022 am 09:53 AM

The reason why phpstudy is garbled is because the encoding and decoding methods are inconsistent. The solution: 1. Open the "Control Panel"; 2. Open "Clock, Language and Region"; 3. Click "Region"; 4. Click " Manage" icon; 5. Click "Change System Regional Settings", select "Specific Language", and then click "OK"; 6. Restart the computer.

How to connect to the database in php8 How to connect to the database in php8 Nov 16, 2023 pm 02:41 PM

PHP8 can use mysqli and PDO to connect to the database. Detailed introduction: 1. Use mysqli to connect to the database by passing in the database server name, user name, password and database name to connect. Then, use the `connect_error` attribute to check whether the connection is successful and output an error message if the connection fails. Finally, close the connection by calling the `close()` method; 2. Use PDO to connect to the database, and connect by passing in the database server name, password and database name, etc.

Why can't phpstudy be installed? Why can't phpstudy be installed? Apr 02, 2024 pm 03:42 PM

PHP Study installation failure may be due to the following reasons: 1. System compatibility issues; 2. Insufficient permissions; 3. File conflicts; 4. Abnormal network connection; 5. Anti-virus software interference; 6. Path problems; 7. System errors. If you encounter a problem that cannot be solved, you can seek support through the PHP Study forum, GitHub or the official website.

See all articles