WINODWS Assembling the PHP development environment

Source: Internet
Author: User
Tags php development environment php windows vc9
WINODWS Installing the PHP development environment

Installation Environment: Windows7 64-bit

Target PHP Runtime Environment: PHP5.4 and Apache2.4

1, open the official website of PHP Windows: http://windows.php.net/download/#php-5.5

2, choose Apache as the server, PHP5.4 thread-safe edition.

VC9 x86 Thread Safe (2013-jun-05 22:49:25)

Because I installed VC9 on the machine and 10 did not install 11 so there is no choice 5.5. php5.5 need to install VC10. You can go to add and remove Programs to see the version of Microsoft Visual C + + 20XX redistributable that you are currently installing. If you installed 11, you can download PHP5.5. or manually download and install it yourself.

?

Download and configure Apache2.4

3, because we chose PHP5.4 so we can not use Apache.org official website of Apache, that only support VC + + 9. Vc++11 is not supported. Also on your machine, make sure that Visual C + + redistributable for visual Studio is installed. x86 or x64?

So we go to http://www.apachelounge.com/download/now 32-bit or 62-bit. The author is a 64-bit Win7 system, but I use 32 bits. Describes 32-bit compatible 64-bit operating systems.

4, are free of installation version. The direct decompression is possible.

5, the address of ServerRoot and DocumentRoot needs to be configured before starting Apache2. Otherwise it won't start.

ServerRoot Configure the Extract directory to your Apache. DocumentRoot Configure your website address, or arbitrarily configure the address, copy the APAHCE directory/htdocs/index.html file to the configured address.

6, open localhost, you can see it works.

?

Configuring PHP and Apache

can refer to http://us1.php.net/manual/zh/install.windows.apache2.php

and http://www.cnblogs.com/pharen/archive/2012/02/06/2340628.html

?

1, parsing PHP,

LoadModule Php5_module " D:/develop/php/php5apache2_4.dll "

AddHandler application/x-httpd-php. php. html. htm

?

2. Add the PHP initialization directory. That's the directory after you unzipped the PHP tarball phpinidir "d:/develop/php"

?

3, add home support PHP file

DirectoryIndex index.html

Switch

DirectoryIndex? index.php ? Index.html

?

PHP section:

4. Set the specific directory for the PHP extension package to find

; On Windows:
; Extension_dir = "ext"

Change to (value is the directory of Ext folder)

; On Windows:
? Extension_dir = "d:/develop/php/ext"

?

5, open the corresponding library function.

; Extension=php_mysql.dll Remove the preceding semicolon (note) and change to

Extension=php_mysql.dll

?

6, set the time zone

;d Ate.timezone =

Switch

Date.timezone = Asia/shanghai

?

PHP Documentation Manual:

http://www.php.net/manual/zh/

?

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