Configuring the Lamp (WAMP) development environment under Windows

Source: Internet
Author: User
Tags php file upload phpinfo

Key words: Build lamp (WAMP)

I think the best development environment for developing the Lamp visualization section is windows, because we can write foreground code with Dreamweaver.

1. Install the MySQL database.

I installed the 5.1 version, I think this version is more classic. : MySQL5.1 download page

Note the installation path is .../lamp/mysql5

2. Install Apache.

This is nothing to say, we mainly talk about this configuration.

Note the installation path is .../lamp/apache2

3. Install PHP.

Unzip the package to .../lamp/php5

4. The climax has begun and the configuration of the php.ini file has begun.

Under the directory of the/LAMP/PHP5

Locate Php.ini-production File

Rename to PHP.ini

4.1. Open PHP.ini.

To find ; extension_dir = "./"

Modified to Extension_dir = "D:/lamp/php5/ext" (I was installed on the D drive, you can modify it yourself)

4.2. Open the corresponding expansion library function.

Find the following lines, and remove each statement in front of it (semicolon).

Extension=php_curl.dll

Extension=php_gd2.dll

Extension=php_mbstring.dll

Extension=php_mysql.dll

Extension=php_mysqli.dll

Extension=php_pdo_mysql.dll

Extension=php_xmlrpc.dll

4.3. Configure the session function of PHP.

Found ; session.save_path = "/tmp"

Change to Session.save_path = "D:/lamp/sessiontmp"

4.4 Configure the PHP file upload function.

Upload_tmp_dir = to find;

Change to upload_tmp_dir = "D:/lamp/fileuploadtmp"

4.5 Configure the time zone.

Date.timezone = to find;

Change to date.timezone = Asia/shanghai

Since then, has achieved a phased victory! php.ini file configuration is complete, let's configure the Apache master configuration file

5. Found the httpd.conf file in/lamp/apache2/conf, open it.

Found #LoadModule vhost_alias_module modules/mod_vhost_alias.so

Add the following

LoadModule php5_module "D:/lamp/php5/php5apache2_2.dll"

Phpinidir "D:/LAMP/PHP5"

AddType application/x-httpd-php. php. html. htm. phtml

5.1 Modifying the Web root directory

Find DocumentRoot "D:/lamp/apache2/htdocs"

Change to documentroot "D:/lamp/www"

Find <directory "D:/lamp/apache2/htdocs" >

Change to <directory "d:/lamp/www" >

5.2 Changing the order of index files

Find directoryindex index.html

Change to directoryindex index.php default.php index.html index.htm index.htm default.html defaut.htm

Here, the Apache configuration file has been modified.

6. Let's try it!

Delegating a phpinfo.php file in the/lamp/www directory

Edit the phpinfo.php file as follows

<?phpphpinfo ();? >

Save and close

We entered in the browser: localhost/phpinfo.php

See this page and you will succeed!

Configuring the Lamp (WAMP) development environment under Windows

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.