Table of Contents
如何架设PHP服务器
Home php教程 php手册 如何架设PHP服务器

如何架设PHP服务器

Jun 13, 2016 am 09:28 AM
apache php one Download software how I server use first

如何架设PHP服务器

   如何架设PHP服务器

  【一】首先下载软件:

  (apache) 我用的是在飓风软件园下载的apache_2.24-win32-x86-no_src!!

  下载址址:http://www.pc6.com/SoftView/SoftView_2253.html

  (jdk!) 在首页上面就有连接。

  (php4) 不用多说了code-labs上面就有也可以去php的官方网站看看!!

  下载地址:http://www.pc6.com/SoftView/SoftView_2165.html

  (iasp) 最重要的一个软件了——————————————————————————————————

  【二】安装apache

  1、双击apache的安装文件,和普通windows程序安装一样,一路点“next”就可以。

  2、安装程序要求你输入你的network domain(网络域名:形如xxx.com);server domain(服务器域名:形www.xxx.com)和网站管理员的e-mail。有的话就按实填写,个人用户若没有的话可以按格式随便填一下。

  3、到了选择安装路径,本人强烈建议你将安装路径改为“c:\”,因为这样可以省去好多的配置麻烦。 4、一路“next”直至“finish”。安装就结束了。

  这时,你的apache已经启动了,你可以在ie地址栏里输入:http://localhost/或http://127.0.0.1看看。在“管理工具”的“服务”项中,也可以找到apache服务的身影了,以后apache就可以作为一项windows2000服务,随着机器的启动而运行了!

  ------------------------------------------------------------------------------

  【三】配置apache

  打开配置文件主要修改的项目是:

  (1)、查找documentroot。这个语句指定你的网站路径,也就是你主页放置的目录。你可以使用默认的,也可以自己指定一个,但记住,这句末尾不要加“/”。

  (2)、寻找到directoryindex。这就是你站点第一个显示的主页,在index.html的后面加入index.htm index.php index.php3 index.cgi index.pl index.asp等等。注意,每种类型之间都要留一空格!

  (3)、特别说明一点就是port(端口号),如果没安装iis的话,就保持80不要变,否则,就要改一下(因为iis的web服务占据了80),可以改成81等等,或者干脆改iis的默认端口号!随你高兴。

  (4).#bindaddress * 改为 bindaddress 127.0.0.1(用记事本打开/然后点编辑/查找)

  其他都是以后深入使用是才要配置的项目了!安装完毕后运行http://localhost/

  就可以看见apache的帮助文件了!

  -----------------------------------------------------------------------------

  【四】安装xxx(注意这个最主要的了)(关闭apache服务)

  (1)、下面安装php首先安装php到c:\php4 (别改路径了!否则以后的配置....哼哼)我用的是php的4.0.2版,

  (2)、接下来就要拷贝msvcrt.dll到c:\winnt\system32\下面系统就回提示所文件正在被windows使用了,不要紧正常现象!覆盖任何原有文件。

  (3)、把 c:\php.ini-dist改名为php.ini,拷贝到c:\winnt下,

  (4)、好了现在打开apache的配置文件httpd.conf增加下面的语句:(随便什么地方都可以,但要单独成行)

  scriptalias /php4/ "c:/php4/"

  addtype application/x-httpd-php4 .php

  addtype application/x-httpd-php4 .php3

  addtype application/x-httpd-php4 .php4

  action application/x-httpd-php4 "/php4/php.exe"

  directoryindex index.html

  directoryindex index.htm

  directoryindex index.php

  directoryindex index.php3

  directoryindex index.php4

  directoryindex index.asp

  (5)、接下来修改php.ini文件

  找到windows extensions项:增加

  extension_dir = c:\php4

  extension=php_zlib.dll

  extension =php_ldap.dll

  extension =php_zlib.dll

  extension =php_calendar.dll

  extension =php_exif.dll

  extension =php_ftp.dll

  extension =php_mssql70.dll (这一项不要加,没有mssql7.0呀)

  extension =php_imap.dll

  ■ok存盘ko■

  在你的documentroot的目录下建立test.php文件

  ok看见php的测试页面了!!至此php的配置已经完成了!

  下面安装jdk也是进行默认安装就可以了!之后在windows的环境变量里面增加path变量值c:\j2sdk*\bin(*:不同版本的安装路径名不同)

  好了下面安装iasp使用默认安装就可以了!在安装过程后软件会提示你进行web server的设置首先选择:

  instant asp native servlet surport 选项接下来选择apache server

  之后要求你选择apche的版本号和httpd.conf的路径选择好后系统自动进行配置如果一切顺利就可以测试了!!

  建立test.asp

  

  现在运行http://localhost/test.asp,看到helloworld!好了一切搞定有可以使用apache了!!!

  ------------------------------------------------------------------------

  【五】、上面说到了windows+apache+php+asp的运行环境了今天来说说在这个基础上使apache也可以支持jsp的运行。

  1:所需软件resin(resin2.1.4)resin http://www.caochu.com

  下面说说怎么安装:

  resin在下载后是.zip文件只要简单的解压缩到指定的目录就可以了这里我使用的是c:\resin-ee-2.1.4 利用命令 c:\resin-ee-2.1.4\bin\httpd.exe -install(remove)将resin作为win2000的一个service

  ok!下面找到win2000的环境变量"控制面板-->系统-->高级-->环境变量“

  增加变量"resin_home"变量值"c:\resin-ee-2.1.4"如果你已经安装了 jdk那么就不需要设置什么了!没有

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

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

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'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: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

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.

Choosing Between PHP and Python: A Guide Choosing Between PHP and Python: A Guide Apr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

Why Use PHP? Advantages and Benefits Explained Why Use PHP? Advantages and Benefits Explained Apr 16, 2025 am 12:16 AM

The core benefits of PHP include ease of learning, strong web development support, rich libraries and frameworks, high performance and scalability, cross-platform compatibility, and cost-effectiveness. 1) Easy to learn and use, suitable for beginners; 2) Good integration with web servers and supports multiple databases; 3) Have powerful frameworks such as Laravel; 4) High performance can be achieved through optimization; 5) Support multiple operating systems; 6) Open source to reduce development costs.

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 and Python: A Deep Dive into Their History PHP and Python: A Deep Dive into Their History Apr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

PHP's Impact: Web Development and Beyond PHP's Impact: Web Development and Beyond Apr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

See all articles