Solution to the failure of adding environment variables to php: 1. Find the environment variable and select "Path->Edit"; 2. Add environment variables; 3. Modify the php.ini configuration; 4. Change all cmd Just close and reopen it.
The operating environment of this article: Windows 10 system, PHP version 7.3, DELL G3 computer
php failed to add environment variables what to do?
windows10 cmd command line to add php environment variable invalid problem solution
Integrated environment: phpStudy
You can also download php separately: https: //windows.php.net/downloads/releases/archives/
The first step is to configure environment variables:
Right-click on My Computer->Properties->Advanced System Settings-> ;Environment Variables->Select Path->Edit
Step 2: Add environment variables
Step 3: Modify the php.ini configuration, delete the (;) semicolon in the following two lines and save it
On windows:
extension_dir = "ext"
Part 4: Close all cmd and reopen it, try again
Recommended learning: "PHP Video Tutorial》
The above is the detailed content of What should I do if php fails to add environment variables?. For more information, please follow other related articles on the PHP Chinese website!