Build apache+mysql+php development environment under Windows, apachemysql_php Tutorial

Source: Internet
Author: User
Tags php development environment sapi

Build apache+mysql+php development environment under Windows, Apachemysql


Requirements

      • Essential knowledge

        Familiar with basic programming environment construction.

      • Operating Environment

        Windows 7 (64-bit);
        Apache2.2;
        MySQL Server 5.5
        php-5.3

      • Download Address

        Environment download

LoadModule php5_module "D:/wamp/php-5.3.25/php5apache2_2.dll" AddType application/x-httpd-php. php Phpinidir "d:/wamp/php-5.3.25/"

The code location in the configuration file is as follows:

DocumentRoot "E:/2015/wamp/apache2.2/htdocs"

Let Apache identify the index.php page

 
  
  
       DirectoryIndex index.html index.php
 
  

Test whether Apache is building successfully

mysql-u[user name]-p[password]

// connect MySQLmysql-h host address-u user name-P user Password // Change password mysqladmin-u user name-p old password password new password # Show commands // displays a list of databases in the current database server:mysql> show DATABASES; // display data tables in the database:mysql> use library name; MySQL> show TABLES; // display the structure of the data table:mysql> DESCRIBE table name;

Php

Unzip the compressed file into the specified folder (here you love how to complete the whole, below to provide my directory structure), PHP can be run in two ways: CGI (corresponding file Php5ts.dll file) and SAPI mode. Because we use Apache, so it is run as SAPI module, the corresponding file is Php5apache2_2.dll. Configure the php.ini file, PHP provides two templates, Php.ini-development and Php.ini-production, the former suitable for the development of program use (test), the latter has a high security settings, is suitable for online when the product use. Here we change the php.ini-development file to PHP.ini to make the configuration file use.

// here according to their actual situation Extension_dir = "E:\2015\wamp\php-5.3\ext"

Set Doc_root to the server root path:

// more personal situation Doc_root = "E:\2015\wamp\Apache2.2\htdocs"

To add an extension:

Choose which extensions you want to run, just remove the comments in front of extension, for example:

extension=php_mysql.dllextension=php_mysqli.dll

Test the installation Results

Create the phpinfo.php file under the server root path, with the following code:

 
  Phpinfo ();?>

Browser input http://localhost/phpinfo.php. The following interface appears to be successful.

Good "button or click on the" like a "button in the bottom right corner of the page. You can also click on the right side of the page " share " hover button Oh, let more people read this article.

Author: Li-cheng Weibo: http://weibo.com/licheng0426 Source: http://www.cnblogs.com/Li-Cheng/p/4381797.html due to my limited level, the article in terms of presentation and code if there is something wrong, welcome criticism. Leave your footprints, welcome to comment Oh. You can also pay attention to me, study together Oh!

(^_^) If you think this article is helpful to you, let's enjoy a coffee bar, what's The DA (^_^)

http://www.bkjia.com/PHPjc/977087.html www.bkjia.com true http://www.bkjia.com/PHPjc/977087.html techarticle under Windows to build the apache+mysql+php development environment, APACHEMYSQL requirements must be familiar with the basic programming environment building. Operating environment Windows 7 (64-bit); Apache2.2; MySQL Server 5.5 php-5.3 ...

  • Related Article

    Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.