Apache+php+mysql installation and configuration under Windows (text) 1th/2 page _php instance

Source: Internet
Author: User
Tags php server php and win32

Prepare the software first:


First, install Apache, configure the success of a common Web server

Run the download Good "Apache_2.0.55-win32-x86-no_ssl.msi", the following interface appears:


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



The Apache HTTP Server 2.0.55 Installation Wizard interface appears, and point "Next" continues

screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



Confirm consent to the Software Installation license regulation, select "I accept the terms in the License Agreement", click "Next" to continue



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


For instructions on how to install Apache on Windows, please press "Next" to continue after reading.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Set up system information, fill in your domain name (for example: goodwaiter.com) under Network domain, and fill in your server name (for example:www.goodwaiter.com, that is, the hostname plus the domain name, in the administrator's email address, fill in the contact email addresses of the system administrators (for example:yinpeng@xinhuanet.com, the above three information is for reference only, in which the contact email address will be provided to the visitor when the system fails, three messages can be filled out arbitrarily, the invalid also line. There are two options for installing all users of the system, using the default 80 ports, and automatically starting as system services, and installing only for the current user, using port 8080, and manually booting. The general selection is shown in the figure. Press "Next" to continue. ]


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



Choose the installation type, typical for the default installation, custom for users to customize the installation, we choose custom here, there are more options available. Press "Next" to continue


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



The Select installation options interface appears, as shown, with the left-click "Apache HTTP Server 2.0.55" selected, "This feature, and all subfeatures, would be installed on the local hard Driv E. "", that is, "this section, and subordinate parts, all installed on the local hard drive." Click Change ... to manually specify the installation directory.


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



I choose to install in the "D:\", you selected, the general recommendation not to install the operating system on the disk, so that the operating system does not work, restore operation of the Apache configuration file also cleared. Select "OK" to continue.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Return to the interface just now and select "Next" to continue.


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



Confirm the installation option is correct, if you think you want to check again, you can point "back" step-by-step return check. Point "Install" starts with the installation option set earlier.


screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>



The interface is being installed, please wait until the screen below appears.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


When the Setup Wizard completes successfully, the status bar in the lower right corner should appear with this green icon, indicating that the Apache service has started running and that the Apache software installation is finished by clicking Finish



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Let's get acquainted with this icon, very convenient, on the icon left-click, the following interface appears, there are "start", "Stop", "Restart (reboot)" Three options, you can easily install the Apache server to do the above operation.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Okay, now let's test it. By defaultConfigurationRun the Web interface, hit the IE Address bar "http://127.0.0.1", click" Go ", you can see the following page, indicating that the Apache server has been successfully installed.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Now start configuring the Apache server to better serve us, in fact, if notConfiguration, your installation directory under the Apache2\htdocs folder is the site's default root directory, in which to put files on it. Here, we still have toConfigurationFor a moment, any questions or modifications,ConfigurationAlways will, as shown in the figure, "Start", "All Programs", "Apache HTTP server 2.0.55", "Configure Apache Server", "Edit" Apache httpd conf Configuration F Ile ", click Open.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' border=0 resized= "true" >


XP Notepad has a little change, a useful function is to see the contents of the file line, column position, as shown in the following figure, point "view", tick "status bar", the interface in the lower right corner is more than a mark, "Ln, Col 10" means "row 78, Column 10", so that you can quickly locate in the file, Easy to explain. Of course, you can also use the "edit", "find" input keyword to quickly locate. EachConfigurationFile changes, save, must be in the Apache server restart after the effective, you can use the small icon in front of the convenient control server at any time "restart."



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Now it's time to start configuring the Apache server, "Ln 228", or find the keyword "DocumentRoot" (that is, the site root), locate the following figure, and then change the address in the "" to your site root directory, address format according to the map, mainly the general file address "\ "Change to"/"in Apache.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


"Ln 253", again, you can also find "



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


"Ln321", DirectoryIndex (directory index, that is, in the case of only specified directory, the default display of the file name), you can add a lot, the system will be based on the order from left to right to display precedence, separated by a single half-width space, For example, some of the site's home page is index.htm, at the cursor where the "index.htm" file name is arbitrary, does not necessarily have to "index.html", such as "test.php" and so on, can be.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Here's a choice.Configurationoption that might previously beConfigurationAnd now it seems to be fixed.Configuration, which is to force the language encoding of all output files, and the language tag in the HTML file (which is to set the document language as GB2312) will also be coerced. If the open page appears garbled, please check the page has the above HTML language tags, if not, add up can be normal display. Remove "#" in front of "# DefaultLanguage NL" and change "NL" to the language you want to force the output, Chinese is "ZH-CN", save, close.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


OK, so the simple Apache configuration is over, now using the previous small icon reboot, all theConfigurationis effective, your site becomes a Web server, if you load the firewall, please open 80 or 8080 ports, or allow the Apache program access to the network, otherwise people can not access. If you have a public network IP (General ADSL or telephone dial-up Internet is all), you can invite all the Internet friends to access the use of http://your IP address (IP address query accessiblehttp://www.goodwaiter.com, the content of the query is your site; If you do not have a public network IP, you can also give the intranet IP address to other users within the LAN, let them through http://your intranet IP address, visit your website.
TwoPHPinstallation, in module mode, PHP and Apache will be combined to enable your Web server to support PHP server script program

Php-5.0.5-win32.zip the downloaded PHP installation file to the right key.



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Specify the location of the decompression, my settings are "D:\php"



screen.width*0.7) {this.resized=true; this.width=screen.width*0.7 this.alt= ' Click here to open new Window\nctrl+mouse Wheel to zoom in/out ';} ' Border=0>


Look at the Unpacked folder contents, locate the "php.ini-dist" file, rename it to "PHP.ini", open the edit, find the place in the figure below, Ln385, there is a "register_globals = off" value that is used to open the global variable. such as the value of the form sent, if this value is set to "off", you can only use "$_post[' variable name '], $_get[' variable name '", etc. to obtain the value sent, if set to "on", you can directly use "$ variable name" to get the value sent, of course, set to "off" is more secure and does not allow people to easily intercept data that is transmitted between pages. Whether this value is changed to "on" depends on what you feel, is security important or convenience important?

Current 1/2 page 12 Next read the full text
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.