Home>Article>Operation and Maintenance> PhpStudy 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
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 PHP8Note: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://m.sbmmt.com/xiazai/gongju/1532
Download addresshttps://windows.php.net/download #php-8.0
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
At this time you can Have fun playing.
The PHP version must be modified here!
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 toD:\phpstudy_pro\Extensions\php\php8.0.2nts
This location executesphp -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 URLhttps://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
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.
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.
;in front.
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 wordextension_dir, and then modify the extension location
At this point, the integration of phpstudy with PHP8 is considered complete and more testing can be invested.
Here are some points to note
“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!