Home php教程 php手册 PHP安装攻略:NT + Apache + PHP3

PHP安装攻略:NT + Apache + PHP3

Jun 13, 2016 am 10:10 AM
ap apache php windows Install Strategy discuss

本文只讨论如何在Windows NT 4.0或Windows 2000下安装Apache+PHP3。
  我使用的Apache为apache_1_3_12_win32.exe。
  注意您得先安装PHP3哦,有关PHP3的安装,可查阅前面介绍的相关文章。
二、安装Apache
  1、双击下载的Apache可执行文件(如apache_1_3_12_win32.exe)进行安装,安装的时候您可以选择安装的目的地,缺省为C:Program FilesApache GroupApache。
  2、修改 C:program filesApache GroupApacheconfhttpd.conf :Port 80
  设置Apache Web Server运行时使用的端口号,由于我这里的IIS也在运行,IIS使用了80端口号,于是我把它改成Port 8080,这时我在浏览器上输入http://localhost:8080/才能访问到Apache Web Server服务器,输入http://localhost/时能访问到IIS,这样两个Web Server都可以用了哦。注意有些已被其它应用程序使用的端口号我们是不能用的,例如Telnet的端口号为23,FTP的端口号为21,DNS的端口号为53等等。
  ServerAdmin you@your.address 设置管理员信箱,当服务器出问题时,它就会把出现的问题发到管理员信箱中,我这里把它改成了pert@21cn.com
 DocumentRoot "C:/Program Files/Apache Group/Apache/htdocs"
  设置文档根目录,当您在浏览器上输入http://localhost:PORT端口号/时,服务器会从文档根目录读取数据,当然你也可以将其改成你喜欢的目录,例如:DocumentRoot "D:/phproot"。
 
注意:如果你要对DocumentRoot指定的路径作更改,那么httpd.conf两处相同的地方都要作一样的更改。
 

把这个改成,我这里为

DirectoryIndex index.html
 设置默认文档,为了支持php3,我把它改成了DirectoryIndex
 index.html index.htm index.php3 index.php index.phtml
  3、为了使用PHP,还应该在C:program filesApache GroupApacheconfhttpd.conf 文件未尾加上类似以下的一段话:
 ScriptAlias /php3/ "c:/php3/"
 AddType application/x-httpd-php3 .php3 .php .phtml
 Action application/x-httpd-php3 "/php3/php.exe"
注意c:/php3/应该改为您那里的PHP目录,而且要用/而不是。
  4、Apache安装完后在Start菜单组中有快捷方式,运行Install Apache as a service,这样的话在NT的服务中就多了一个名为Apache的服务,用它可以启动或停止Apache服务。
  5、启动Apache服务,完装完毕,祝您好运。

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP: Handling Databases and Server-Side Logic PHP: Handling Databases and Server-Side Logic Apr 15, 2025 am 12:15 AM

PHP uses MySQLi and PDO extensions to interact in database operations and server-side logic processing, and processes server-side logic through functions such as session management. 1) Use MySQLi or PDO to connect to the database and execute SQL queries. 2) Handle HTTP requests and user status through session management and other functions. 3) Use transactions to ensure the atomicity of database operations. 4) Prevent SQL injection, use exception handling and closing connections for debugging. 5) Optimize performance through indexing and cache, write highly readable code and perform error handling.

PHP's Purpose: Building Dynamic Websites PHP's Purpose: Building Dynamic Websites Apr 15, 2025 am 12:18 AM

PHP is used to build dynamic websites, and its core functions include: 1. Generate dynamic content and generate web pages in real time by connecting with the database; 2. Process user interaction and form submissions, verify inputs and respond to operations; 3. Manage sessions and user authentication to provide a personalized experience; 4. Optimize performance and follow best practices to improve website efficiency and security.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

PHP: Creating Interactive Web Content with Ease PHP: Creating Interactive Web Content with Ease Apr 14, 2025 am 12:15 AM

PHP makes it easy to create interactive web content. 1) Dynamically generate content by embedding HTML and display it in real time based on user input or database data. 2) Process form submission and generate dynamic output to ensure that htmlspecialchars is used to prevent XSS. 3) Use MySQL to create a user registration system, and use password_hash and preprocessing statements to enhance security. Mastering these techniques will improve the efficiency of web development.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

How to build a Zookeeper cluster in CentOS How to build a Zookeeper cluster in CentOS Apr 14, 2025 pm 02:09 PM

Deploying a ZooKeeper cluster on a CentOS system requires the following steps: The environment is ready to install the Java runtime environment: Use the following command to install the Java 8 development kit: sudoyumininstalljava-1.8.0-openjdk-devel Download ZooKeeper: Download the version for CentOS (such as ZooKeeper3.8.x) from the official ApacheZooKeeper website. Use the wget command to download and replace zookeeper-3.8.x with the actual version number: wgethttps://downloads.apache.or

See all articles