Home Backend Development PHP Tutorial Building a PHP development environment under Windows_PHP tutorial

Building a PHP development environment under Windows_PHP tutorial

Jul 20, 2016 am 11:15 AM
php windows xampp Down develop build have environment Integrated development

There are many PHP integrated development environments, such as XAMPP, AppServ... Just one-click installation will set up the PHP environment. However, this installation method is not flexible enough, it is inconvenient to freely combine software, and it is not conducive to learning. Therefore, I still prefer to build a PHP development environment manually. I can just install which modules I need, or if that software needs to be upgraded, I can just upgrade that software directly. It does not affect other software, which is very convenient.

 

  • Apache httpd-2.2.22-win32-x86-openssl-0.9.8t.msi
  • PHP php-5.3.10-Win32-VC9-x86.zip
  • MySQL mysql-5.5.20-win32.msi

 

 : Double-click installation is no different from installing other Windows software. When filling in Server Information, there are no special regulations, as long as the entered information conforms to the format.

Building a PHP development environment under Windows_PHP tutorial: Extract 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

in Choose Setup Type

Building a PHP development environment under Windows_PHP tutorial3. Integrate Apache+PHP+MySQL

Apache: First modify the Apache configuration file so that Apache supports parsing PHP files. The Apache configuration file is httpd.conf in the conf directory of the Apache installation directory.

1. Let Apache 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 the directory where PHP is located)

    LoadModule php5_module ""
  PHPIniDir " "
AddType application/x-httpd-php .php .html .htm

 2. Find

in the configuration file

DirectoryIndex index.html

Change to

   DirectoryIndex 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 ""

Change to

   DocumentRoot ""

  

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 (the value is the directory of the ext folder)

   ; On windows:
   extension_dir = ""

2. Enable the corresponding library function and find the line where the library needs to be enabled

; extension=php_curl.dll

; extension=php_gd2.dll

; extension=php_mbstring.dll

; extension=php_mysql.dll

; extension=php_xmlrpc.dll

Remove the semicolon (comment) in front and 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 successful. Restart Apache, create a new file index.php in the site directory, and enter the content:

Building a PHP development environment under Windows_PHP tutorial
<?php<br />    <span phpinfo</span>();<br />?>
Copy after login
Building a PHP development environment under Windows_PHP tutorial

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

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/440187.htmlTechArticleThere are many PHP integrated development environments, such as XAMPP, AppServ... Just install PHP with one click The environment is set up. However, this installation method is not flexible enough, and the free combination of software is inconvenient. At the same time...
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 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)

Can I install mysql on Windows 7 Can I install mysql on Windows 7 Apr 08, 2025 pm 03:21 PM

Yes, MySQL can be installed on Windows 7, and although Microsoft has stopped supporting Windows 7, MySQL is still compatible with it. However, the following points should be noted during the installation process: Download the MySQL installer for Windows. Select the appropriate version of MySQL (community or enterprise). Select the appropriate installation directory and character set during the installation process. Set the root user password and keep it properly. Connect to the database for testing. Note the compatibility and security issues on Windows 7, and it is recommended to upgrade to a supported operating system.

The Future of PHP: Adaptations and Innovations The Future of PHP: Adaptations and Innovations Apr 11, 2025 am 12:01 AM

The future of PHP will be achieved by adapting to new technology trends and introducing innovative features: 1) Adapting to cloud computing, containerization and microservice architectures, supporting Docker and Kubernetes; 2) introducing JIT compilers and enumeration types to improve performance and data processing efficiency; 3) Continuously optimize performance and promote best practices.

Unable to access mysql from terminal Unable to access mysql from terminal Apr 08, 2025 pm 04:57 PM

Unable to access MySQL from the terminal may be due to: MySQL service not running; connection command error; insufficient permissions; firewall blocks connection; MySQL configuration file error.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP's Current Status: A Look at Web Development Trends PHP's Current Status: A Look at Web Development Trends Apr 13, 2025 am 12:20 AM

PHP remains important in modern web development, especially in content management and e-commerce platforms. 1) PHP has a rich ecosystem and strong framework support, such as Laravel and Symfony. 2) Performance optimization can be achieved through OPcache and Nginx. 3) PHP8.0 introduces JIT compiler to improve performance. 4) Cloud-native applications are deployed through Docker and Kubernetes to improve flexibility and scalability.

PHP: The Foundation of Many Websites PHP: The Foundation of Many Websites Apr 13, 2025 am 12:07 AM

The reasons why PHP is the preferred technology stack for many websites include its ease of use, strong community support, and widespread use. 1) Easy to learn and use, suitable for beginners. 2) Have a huge developer community and rich resources. 3) Widely used in WordPress, Drupal and other platforms. 4) Integrate tightly with web servers to simplify development deployment.

PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

See all articles