Installation and configuration of Apache and PHP in Windows 9x/NT (2) _ PHP Tutorial-php Tutorial

Source: Internet
Author: User
Tags apache windows parse error php3 file
Installation and configuration of Apache and PHP in Windows9xNT (2 ). 5. run Apache in WindowsNT. if you run the WindowsNT system, you may need to run Apache as a system service process. Click "start" and select "program". "5. run Apache in Windows NT.

If you are running a Windows NT system, you may want to run Apache as a service process of the system. Click Start, Select programs, Apache Web Server, and Insfall Apache as Service ". In this way, you can manage Apache startup and termination through the "Service" program in the control panel of NT. Unless for special reasons, I suggest you change the "Apache Service" running mode to "manual": open the Control Panel, select the "Service" icon, and find "Apache Service ", click "run" to set the running mode to "manual ". However, to run Apache, you must start it yourself. However, Apache will automatically close when NT is disabled, and you will not see any Apache windows.

6. run in Windows 9x

If you are using Windows 9x, I suggest you download "Apache Manager for Windows" from the author's website ". It stays in the lower right icon bar while running, and hides the console window created by Apache. This program allows you to directly start, stop, and restart Apache without the annoying command line. If you do not need "Apache Manager", you should start Apache by selecting "start", "program", "Apache webserver", and "Apache Server" to create a console window. Do not close this window. if it is closed, Apache will stop. To stop running Apache, open a MS-Dos window, switch to the directory where you install Apache, and execute the following command: apache-k shutdown Apache takes a moment to close its console window. This is mainly to ensure that all processes are uninstalled and all. conf and. log files are closed. This is exactly why the author wrote Apache Manager.

7. test your system

I strongly recommend that you run Apache at least once in the console window. To obtain information displayed during Apache running, you can use the control window or error. log file. The error. log file is stored in the log subdirectory of the Apache installation directory. For example, c: \ Apache \ log \ error. log. Okay. select "Apache server" from "start", "program", and "Apache Webserver" to run Apache. if everything is OK, you should see the following information:

Apache/1.3.9 (Win32) running...

If you fail to see this message or the Apache window is transient, you must start Apache from the Dos window as a command line. Switch to the directory where you install Apache and type "Apache" to see what messages are displayed. If it is "parse error in the conf file", the problem may be caused by your httpd. conf. Check and correct the error.

All started to work normally. To test your system, open a browser and enter the following address: http: // localhost/. you will see a page displayed by Apache, it says something like "It works. If this page does not appear, your TCP/IP configuration may be incorrect. copy the sam file as the hosts file and check whether there is a " localhost" line, which is not commented out.

Next, try the php file. Use your favorite editor and create a file named info. php3 in the htdocs subdirectory under the APache installation directory. the content is as follows:

Open your browser and enter the following address: http: // localhost/info. php3. If there is no problem, you will see a very long table containing various PHP configuration information and related environment variables, including Apache. If it does not work, check whether your httpd. conf settings are correct. this is important. If not, Apache does not know how to process the. php3 file.

8. use Directory alias (Directory Aliases)

You don't have to put everything in the htdocs directory. In order for Apache to correctly point to the directory you want, you must edit the httpd. conf file and add the "Alias" command. It is very simple, as shown below:

Alias/yoursite/"c: path/to/your/web/site /"

Restart Apache and the Directory you created will start to work. Open http: // localhost/yoursite/in your browser /. Of course, you can replace "yoursite" with your preferred name, and then in "c: \ path \ to \ your \ website "follow your ideas to create a website structure of your own.

Running Apache under javasnt if you are running Windows NT, you may need to run Apache as a service process of the system. Click "start" and select "program", "...

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

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: and provide relevant evidence. A staff member will contact you within 5 working days.