博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
How to Install PHP 5 for Iis 6 on Windows Xp and 2003 - wikiHow
阅读量:2400 次
发布时间:2019-05-10

本文共 4963 字,大约阅读时间需要 16 分钟。

导读:

Step by step guide on how to install iis6 and php5 on Windows XP

or Windows Server 2003

[]
Steps

  1. First you must install IIS 6.0.
  2. On Windows XP, Go to your control panel > add remove
    programs. Click on "Add/Remove Windows Components". Place a check
    for "Internet Information Services".
  3. On Windows Server 2003 Go to your control panel > add remove
    programs. Click on "Add/Remove Windows Components". Place a check
    for "Application Server" and click on the details button. Here you
    want to make sure there is a check for "Internet Information
    Services". You can also add ASP.net very easily here.
  4. IIS 6.0 is now installed. Now you must get the correct files
    for php5. Head over to and download the
    zip package under "Windows Binaries" Do not get the
    installer!
    In addition, while you are here you will need to get
    the "Collection of PECL modules" also under Windows Binaries.
  5. Once Downloaded extract the first file you downloaded and place
    the files in "C:/php". Extract the PECL modules to
    "C:/php/ext".
  6. Rename C:/php/php.ini-recommended to C:/php/php.ini and then
    COPY it to C:/Windows
  7. Open both the php.ini file you have now and uncomment
    cgi.force_redirect in php.ini and set it to 0
  8. Find SMTP = localhost and make sure it is uncommented. If your
    mail server is somewhere else you may specify it here. Also set
    this line just below the above: sendmail_from =
    someone@yourhost.com
  9. Change session.save_path as "session.save_path=C:/php/sessions"
    and make the directory C:/php/sessions
  10. Set the line "extension_dir" as "extension_dir =
    "C:/PHP/ext".
  11. Uncomment all of the following items.
    extension=php_mssql.dll
    extension=php_msql.dll
    extension=php_mysql.dll
    extension=php_mysqli.dll
    extension=php_java.dll
    extension=php_ldap.dll
    extension=php_iisfunc.dll
    extension=php_imap.dll
    extension=php_filepro.dll
    extension=php_gd2.dll
    extension=php_gettext.dll
    extension=php_dba.dll
    extension=php_dbase.dll
    extension=php_dbx.dll
    extension=php_mbstring.dll
    extension=php_pdf.dll
    extension=php_pgsql.dll
    extension=php_sockets.dll
    extension=php_xmlrpc.dll
    extension=php_xsl.dll
    extension=php_zip.dll
    The rest require more attention and is out of the scope of this
    tutorial.
    Some of the items might not be there. In that case, simply copy the
    line to your ini file.
  12. Now copy all of those DLL files in C:/php/ext to
    C:/windows/system32 or add "C:/PHP;" to your Windows path.
    • To add php to your Windows
      path:
      1. Right Click on My Computer and choose properties > Advanced
        Tab > Click "Environment Variables".
      2. Now add "C:/PHP;" to the very beginning.
      3. Now go to start > run > type: regedit and click ok
      4. Add HKEY_LOCAL_MACHINE/SOFTWARE/PHP/IniFilePath = C:/php to the
        registry. If you change your windows path instead of copying the
        dll files then you will need to restart your computer before php
        will work. Updating php is easier when you add it to your Windows
        path. So bookmark this page and go restart. Now is the best time
        since we are done with file placement.
    • Ok, you are back. Now it is time to let IIS know that you have
      php and you are going to tell IIS how to use it and when.
    • Open Internet Services Manager in your Administrative Tools in
      the start menu.
    • Right Click on Web Service Extensions located on the left hand
      side and choose Add a new web service extension. Enter in php and
      click add. Browse to C:/php/php5isapi.dll. Also set extension
      status to allow. Click ok. (this step is only needed for Windows
      2003/IIS 6, not for Windows XP/IIS 5.1.)
    • Right Click on websites and choose properties. Go to the
      Documents tab and add index.php as a start document. Go to the Home
      Directory Tab and click on Configuration. Now go to the mappings
      tab and click on add. Enter .php for the extension and enter
      "C:/php/php5isapi.dll" in the executable textbox. Make sure all
      verbs is checked and click ok, click ok, click ok. You are done
      installing it. Now you need to test it.
    • Go to C:/Inetpub/wwwroot and delete everything in there except
      for aspnet_client. Now make a new text file and name it
      phpinfo.php. Open it up with your text editor ant put this in it:
      .
    • Open a web Browser and go to http://127.0.0.1/phpinfo.php
    • If you followed all the instructions, it should work fine.

[] Tips

  • If you need help, you can always use php.net for help. It is a
    great place for learning php too.
  • If php does not work, try uncommenting dll file extensions in
    the php.ini files. Remember there is one in your C:/Windows
    directory and one in your C:/php directory. It will use the one the
    windows path is.
  • If you add C:/PHP to your env variables, you could end up
    loading the php.ini from the C:/PHP folder (or your equiv)
  • For those that prefer visual learning, provides a comprehensive
    video tutorial for installing PHP in Windows XP and 2003.

[]
Warnings

  • Once running, make a copy of C:/php and keep it. You may
    need this later.
    It is also a good idea to do an ISS
    configuration export.

[]
Things You'll Need

  • A Windows XP SP2 or Windows Server 2003 Installation

[]
Related wikiHows

本文转自

转载地址:http://dwiob.baihongyu.com/

你可能感兴趣的文章
清华梦的粉碎读后感--论理想主义者王垠
查看>>
生活中的优化和向往(r11笔记第72天)
查看>>
最近的几个技术问题总结和答疑(七)
查看>>
容灾切换中的数据库宕机问题简单分析(一)
查看>>
几年前的一次答疑解惑
查看>>
MySQL RR隔离级别的更新冲突策略
查看>>
MySQL索引条件下推的简单测试
查看>>
通过SQL解读财富的分配(二)
查看>>
一个MySQL死锁问题的复现
查看>>
数据迁移中的几个问题总结
查看>>
心理学中的效应简单解读(r12笔记第24天)
查看>>
mysqldump简单解析
查看>>
Oracle备库无法连接主库的问题分析
查看>>
最近一周的学习计划
查看>>
MySQL备份和恢复工具图谱
查看>>
从零开始搭建Nginx和Tomcat的web集群环境
查看>>
关于技术文档
查看>>
alert日志中的一条ora警告信息的分析
查看>>
美国旧金山之行第四天
查看>>
zookeeper初探
查看>>