Home  >  Article  >  php教程  >  在WIN98下以apache模块方式安装php

在WIN98下以apache模块方式安装php

WBOY
WBOYOriginal
2016-06-21 09:04:41969browse
在WIN98下以apache模块方式安装php手记
foolboy@chinaren.com

★相关软件:
    mod_php4-4.0.1-pl2.zip
    php-4.0.1pl2-Win32.zip
    以上软件可以在www.php.net或者www.phpuser.com上下载
    注意两者的版本一定要一样,
    (关键是mod_php4.dll与php4ts.dll及Msvcrt.dll版本相同)

★具体步骤:
    用winzip分别将两个.zip文件解压
    php-4.0.1pl2-Win32.zip解压至 E:\php\目路中
    mod_php4-4.0.1-pl2.zip解压至 E:\mod_php\目录中

    (一)安装php解释器,将php.ini-dist拷贝至%WINDOWS%即windows
  的安装目录下,重命名为php.ini.用编辑器编辑php.ini 改动如下:
  extension  dir = E:\Phptools\php\ ;动态加载库所在目录
    在Atuoexec.bat中增加 SET PASS=E:\phptools\php\
     (这样做最后需要重新启动一下);
   或者直接将php4ts.dll拷贝至%SYSTEM%中(不需要重新启动)

    (二)给Apache添加模块,
  将E:\mod_php\apache_dir\modules\下的mod_php4.dll拷贝至
                    Apache安装目录下的.\modules子目录中;
  将Msvcrt.dll 拷贝至Apache安装的根目录下;
  将 E:\mod_php\apache_dir\conf\mod_php4.conf拷贝至Apache的 .\conf子目录中;
  然后编辑Apache的.\conf下的srm.conf 在其中添加一条:
  Include conf/mod_php4.conf;

★最后测试
   执行 apache -k start 进行启动,看到出现
   Apache/1.3.14 (Win32) PHP/4.0.1pl2 running...
   可以知道你的php已经以Apache模块方式运行了, 如果还不确定就
   写一个test.php测试吧.
   test.php
    phpinfo() ?>
   
   注:本次使用的Apache版本是1.3.14



Statement:
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
Previous article:怎样在UNIX系统下安装php3Next article:PHP编程与应用