search
HomeOperation and MaintenancephpstudyPhpStudy installs PHP8 [detailed graphic and text explanation]

"

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
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
How do I configure phpStudy to handle CORS (Cross-Origin Resource Sharing) requests?How do I configure phpStudy to handle CORS (Cross-Origin Resource Sharing) requests?Mar 17, 2025 pm 06:14 PM

Article discusses configuring phpStudy for CORS, detailing steps for Apache and PHP settings, and troubleshooting methods.

How do I use phpStudy to test cookies in PHP?How do I use phpStudy to test cookies in PHP?Mar 17, 2025 pm 06:11 PM

The article details using phpStudy for PHP cookie testing, covering setup, cookie verification, and common issues. It emphasizes practical steps and troubleshooting for effective testing.[159 characters]

How do I use phpStudy to test file uploads in PHP?How do I use phpStudy to test file uploads in PHP?Mar 17, 2025 pm 06:09 PM

Article discusses using phpStudy for PHP file uploads, addressing setup, common issues, configuration for large files, and security measures.

How do I set up a custom session handler in phpStudy?How do I set up a custom session handler in phpStudy?Mar 17, 2025 pm 06:07 PM

Article discusses setting up custom session handlers in phpStudy, including creation, registration, and configuration for performance improvement and troubleshooting.

How do I use phpStudy to test different payment gateways?How do I use phpStudy to test different payment gateways?Mar 17, 2025 pm 06:04 PM

The article explains how to use phpStudy to test different payment gateways by setting up the environment, integrating APIs, and simulating transactions. Main issue: configuring phpStudy effectively for payment gateway testing.

How do I configure phpStudy to handle HTTP authentication in a secure manner?How do I configure phpStudy to handle HTTP authentication in a secure manner?Mar 17, 2025 pm 06:02 PM

The article discusses configuring phpStudy for secure HTTP authentication, detailing steps like enabling HTTPS, setting up .htaccess and .htpasswd files, and best practices for security.Main issue: Ensuring secure HTTP authentication in phpStudy thro

How do I use phpStudy to test different database connection options?How do I use phpStudy to test different database connection options?Mar 17, 2025 pm 06:02 PM

phpStudy enables testing various database connections. Key steps include installing servers, enabling PHP extensions, and configuring scripts. Troubleshooting focuses on common errors like connection failures and extension issues.Character count: 159

How do I use phpStudy to test different PHP frameworks and libraries?How do I use phpStudy to test different PHP frameworks and libraries?Mar 17, 2025 pm 06:00 PM

The article explains using phpStudy for testing PHP frameworks and libraries, focusing on setup, configuration, and troubleshooting. Key issues include version management and resolving common errors.

See all articles

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)
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
3 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
WWE 2K25: How To Unlock Everything In MyRise
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

SecLists

SecLists

SecLists is the ultimate security tester's companion. It is a collection of various types of lists that are frequently used during security assessments, all in one place. SecLists helps make security testing more efficient and productive by conveniently providing all the lists a security tester might need. List types include usernames, passwords, URLs, fuzzing payloads, sensitive data patterns, web shells, and more. The tester can simply pull this repository onto a new test machine and he will have access to every type of list he needs.

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

MantisBT

MantisBT

Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.