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

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

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











PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.
