Teach you to learn WinXP build PHP development Environment _php Tutorial

Source: Internet
Author: User
Tags php language pear php development environment php editor

WinXP Building PHP Development Environment 1. Installing the Apache server

Address: http://httpd.apache.org/download.cgi

Download current new version: Apache_2.2.13-win32-x86-openssl-0.9.8k.msi

Run the installation files directly.

This example installs the path: D:program filesapache software FoundationApache2.2

WinXP Build PHP Development environment 2. Install PHP

Currently the latest stable version is PHP 5.2.11, but there is no corresponding PECL package, 5.2.6 PECL package can still run on this version. I also chose to use the 5.2.6 version. Download Address: http://www.php.net/releases/

Two files downloaded: php-5.2.6-win32.zip, Pecl-5.2.6-win32.zip. The first file is the PHP interpreter, the second is PECL (the PHP Extension Community Library), which contains the C language code that can be compiled into the PHP Core, so you can compile the PECL extension library into a dynamically loaded. So shared library, which Extend the PHP language from the ground up.

Unzip two compressed files and copy all DLL files under Pecl-5.2.6-win32 to the Ext directory under Php-5.2.6-win32. And put the php-5.2.6-win32 where you want to go. The PHP core interpreter is a complete installation.

This example installs the path: D:program filesphpphp-5.2.6-win32

To modify two files:

1) PHP configuration file. There are two self-brought files under the PHP installation path: Php.ini-dist and php.ini-recommended. We modify the first one, copy the first file and change the name to PHP.ini.

Modify: Extension_dir entry, which indicates the location of the extension DLL directory. Instead: Extension_dir = "D:/program files/php/php-5.2.6-win32/ext"

The Doc_root entry that indicates the path to the Web server. Instead: Doc_root = "D:/program files/apache software Foundation/apache2.2/htdocs"

Enable some extensions. Some already exist, but are commented out, as long as the line before the; If you are not sure what you are going to use, this step can be done temporarily.

2) Apache configuration file. Add PHP to the Apache configuration. Modify the httpd.conf file in conf under Apache installation directory and add the following statement:

LoadModule php5_module "D:/program files/php/php-5.2.6-win32/php5apache2_2.dll"

Phpinidir "D:/program files/php/php-5.2.6-win32/"

AddType application/x-httpd-php. php

It is important to note that the "D:/program Files/php/php-5.2.6-win32/php5apache2_2.dll" must use double quotation marks, otherwise Apache cannot start the service.

WinXP Build PHP development Environment 3. Test the installation.

Create a test file in the directory with the Apache server test.php

File contents:

Start the server and Access HTTP://127.0.0.1/. All configuration information for PHP will be printed.

4. Install the pear.

In the PHP directory to run the Go-pear.bat command, the installation process all the way to enter the line. Pear is the official open source class library for PHP, the abbreviation for PHP Extension and application repository. Pear is the meaning of pears in English. Pear the PHP program development process commonly used in the function of writing into a class library, covering the page surface, database access, file operations, data structure, caching operations, network protocols and many other aspects, users can be very convenient to use.

WinXP Build PHP Development Environment 5. Configure the environment variable to add the PHP installation directory to path.

Otherwise, some PHP-supported functions could not be found, such as libmysql.dll files related to MySQL, you can search the Internet and some people will tell you to copy this file to the window directory. To solve the same problem, setting path is obviously more professional.

WinXP Build PHP Development Environment 6. Editor The author chooses Zend,eclipse also has the special PHP editor.

Zend7.0 later started using Eclipse plug-in technology, and, like Eclipse, did not know if it was meant to attract a large number of Java developers.

WinXP Build PHP Development Environment 7. If the code that uses the Zend,php project is placed under workspace.

PHP is not a programming language is just a script, do not need to compile, so you can configure the Apache project publishing directory to workspace, so that the code can see the results, very convenient.

That is, modify the Apache installation directory under the conf/httpd.conf file DocumentRoot entries, change to workspace location.


http://www.bkjia.com/PHPjc/446132.html www.bkjia.com true http://www.bkjia.com/PHPjc/446132.html techarticle WinXP Build PHP Development environment 1. Install Apache server address: http://httpd.apache.org/download.cgi Download current version: apache_2.2.13- Win32-x86-openssl-0.9.8k.msi run the installation text directly ...

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