How to set up php development environment configuration
1. Preparation - Download the required software
●Apache httpd-2.4.25-win64-VC14.zip
● PHP php-7.1.0-Win32-VC14-x64.zip
Recommended: PHP Integrated Development Environment Tool (Integrated tool, one-click deployment, avoiding the tedious step-by-step setup)
2. Install the software (since the new version no longer provides installation files, only source code, VC14 installation method)
Solution to httpd: Could not reliably determine the server's fully qualified domain name
Install Apache: Double-click installation, which is no different from installing other Windows software. When filling in Server Infomation, there are no special regulations, just enter The information must conform to the format. (Related tutorial recommendations: php video tutorial)
## After the installation is complete, enter http://localhost in the browser. If It Works! is displayed, it means that Apache is installed successfully.
: Unzip php-5.3.10-Win32-VC9-x86.zip to a directory.
Install MySQL: Double-click to install. If you need to change the installation directory, select Custom
## After the installation is complete, start configuring MySQL. You can keep all the default options, but it is best to change the MySQL default encoding to utf8, set the password in the Modify Security Settings option, and enter the password twice to complete. Finally, click Execute to complete the configuration.
3. Integrate Apache PHP MySQL
Apache: First modify the Apache configuration file , let Apache support parsing PHP files. The Apache configuration file is httpd.conf in the conf directory of the Apache installation directory.
1. Allow Apache to parse the php file and find in the configuration file. #LoadModule vhost_alias_module modules/mod_vhost_alias.so Add in the next line (the green position is based on PHP Depends on the directory where it is located) LoadModule php5_module "D:/Develop/PHP/php5apache2_2.dll
" PHPIniDir "D:/Develop/PHP "
AddType application/x-httpd-php .php .html .htm 2. Find
index.php
index.html3. Modify the Apache site directory and find it in the configuration file (the values displayed are different depending on the directory where Apache is installed)
DocumentRoot "D:/Develop/Apache2.2/htdocs
"Changed to
DocumentRoot "D:/Workspace/PHP
"Find again
Change to
PHP: Rename php.ini-development to php.ini as the PHP configuration file. Modify php.ini
1. Set the specific directory of the PHP extension package and find
; On windows:
; extension_dir = "ext"
Change to (value Is the directory of the ext folder)
; On windows:
extension_dir = "D:/Develop/PHP/ext"
2. Open the corresponding library Function, find the line of the library that needs to be opened
;extension=php_curl.dll
;extension=php_gd2.dll
;extension=php_mbstring.dll
;extension=php_mysql.dll
;extension=php_xmlrpc.dll
Remove the preceding semicolon (comment), that is, change it to
extension=php_curl.dll
extension=php_gd2.dll
extension=php_mbstring.dll
extension=php_mysql.dll
extension=php_xmlrpc.dll
3 . Set the time zone and find
; date.timezone =
Change to
date.timezone = Asia/Shanghai
The configuration is complete, check whether the configuration is complete success. Restart Apache, create a new file index.php in the site directory, enter the content:
<?php phpinfo(); ?>
Open the browser and enter http://localhost. If the following content is displayed, the installation is successful and the association is successful. MySQL.
The above is the detailed content of How to set up php development environment configuration. For more information, please follow other related articles on the PHP Chinese website!

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

In this chapter, we will understand the Environment Variables, General Configuration, Database Configuration and Email Configuration in CakePHP.

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

In this chapter, we are going to learn the following topics related to routing ?

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.
