Home Backend Development PHP Tutorial How to set up php development environment configuration

How to set up php development environment configuration

Jun 11, 2019 pm 04:05 PM
php Environment configuration

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

##● MySQL

mysql-5.5.20-win32 .msi

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)

How to set up php development environment configuration

How to set up php development environment configuration

How to set up php development environment configuration

How to set up php development environment configuration

How to set up php development environment configuration## After the installation is complete, enter http://localhost in the browser. If It Works! is displayed, it means that Apache is installed successfully.

How to set up php development environment configuration 

Install PHP

: 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

How to set up php development environment configuration

# in the Choose Setup Type

How to set up php development environment configuration## 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. How to set up php development environment configuration

How to set up php development environment configuration

 How to set up php development environment configuration3. 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

in the configuration file DirectoryIndex index.html

Change to

DirectoryIndex

index.php

index.html

3. 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

 D:/Develop/Apache2.2/htdocs">

 Change to

 D:/Workspace/PHP">  

 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();
?>
Copy after login

Open the browser and enter http://localhost. If the following content is displayed, the installation is successful and the association is successful. MySQL.

How to set up php development environment configuration

How to set up php development environment configuration

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!

Statement of this Website
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

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)
2 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Repo: How To Revive Teammates
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Hello Kitty Island Adventure: How To Get Giant Seeds
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

CakePHP Project Configuration CakePHP Project Configuration Sep 10, 2024 pm 05:25 PM

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

PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian PHP 8.4 Installation and Upgrade guide for Ubuntu and Debian Dec 24, 2024 pm 04:42 PM

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

CakePHP Date and Time CakePHP Date and Time Sep 10, 2024 pm 05:27 PM

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

CakePHP File upload CakePHP File upload Sep 10, 2024 pm 05:27 PM

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

CakePHP Routing CakePHP Routing Sep 10, 2024 pm 05:25 PM

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

Discuss CakePHP Discuss CakePHP Sep 10, 2024 pm 05:28 PM

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

How To Set Up Visual Studio Code (VS Code) for PHP Development How To Set Up Visual Studio Code (VS Code) for PHP Development Dec 20, 2024 am 11:31 AM

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

CakePHP Creating Validators CakePHP Creating Validators Sep 10, 2024 pm 05:26 PM

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

See all articles