登录 注册

Windows 下 PHP 环境的配置

资讯 驱动中国 75 次阅读 0 条评论
分享 Q

1. 所需软件环境:
1. apache 2.2 
2. active perl 5.8  c:\perl
3. php 5.1  必须安在 c:\php
4. ZendOptimizer-3.0.2 
5. php环境所需 includes  --在 php 安装之后,无法正常运行时必须的库。
-----------------------------------------------
2. apache 2.2--------httpd.conf 文件配置
1. 第133行前面加 #
2. 修改  <IfModule alias_module> </IfModule> 之间
ScriptAlias /cgi-bin/ "D:/Programmes/Server/Apache2.2/cgi-bin/"
        及
        <Directory "D:/Programmes/Server/Apache2.2/cgi-bin">
        划线部分分别改为  C:/php/  和  C:/php
3.  将 #!c:/program files/perl/perl  改为  #!C:/Perl/bin
4.  在文件末尾添加
    ScriptAlias /php/ "c:/php/"
AddType application/x-httpd-php .php

# For PHP 4
#Action application/x-httpd-php "/php/php.exe"

# For PHP 5
Action application/x-httpd-php "/php/php-cgi.exe"
-------------------------------------------------------------------------------
3. php配置细则:
      1. 将 c:\php 加入 windows 环境变量 path 中
      2. 将 includes 拷入 c:\php\includes
      3. 将 php.ini-dist 改名为 php.ini
      4. 下面是 php.ini 配置细则:
            1. 将 doc_root =  设置为 doc_root = D:\Programmes\Server\Apache2.2\htdocs
            2. 将 extension_dir =  设置为 extension_dir = "C:\php\ext"
            3. 将 ;extension=php_mysql.dll 前面的 ”;” 去掉,改为 extension=php_mysql.dll
            4. 在 ; Windows: "\path1;\path2" 下面 的 include_path =  改为
                    include_path = ".;c:\php\includes"
        5.  对 [MySQL] 下面进行配置

4. active perl 安装很简单照着指示做就可以 最好安到 c:\perl
5. ZendOptimizer 安装时把 apache 服务器关掉,在过程中要指定 apache 和 php 的安装路径。


<? phpinfo() ?>

版权声明:本文由驱动中国整理发布,转载需注明出处与原文链接。如有疑问请联系 editor@qudong.com
本文价值 成为第一个评分的人
登录后为本文打分
网友评论0 条评论
正在回复 的评论取消
评论加载中…
🔐

登录后参与互动

评论、点赞均可赚积分
连续签到、邀请好友也有奖励 🎁

电脑端: 微信扫码登录 微信内: 一键登录

微信扫一扫

打开微信「扫一扫」,分享本文到朋友圈或好友