关于php设置
Security Alert! The PHP CGI cannot be accessed directly.
This PHP CGI binary was compiled with force-cgi-redirect enabled. This means that a page will only be served up if the REDIRECT_STATUS CGI variable is set, e.g. via an Apache Action directive.

For more information as to why this behaviour exists, see the manual page for CGI security.

For more information about changing this behaviour or re-enabling this webserver, consult the installation file that came with this distribution, or visit the manual page.
这样的错误是为什么呀!

------

回复此文章 |

你的php配置文件中
REDIRECT_STATUS CGI 设为off了,

请将其设为on.
------

回复此文章 |

对了这文件在哪儿呀!
是干什么用的呀
------

回复此文章 |

你可以上网查资料啊..

关于PHP环境配置的资料一堆堆的。

不过有什么好资料别忘了在这里粘贴一份哦
------
回复此文章 |


安装步骤:   1.mysql   在如下页面下载mysql的for linux rpm包   http://www.mysql.com/downloads/down...3.52-1.i386.rpm   http://www.mysql.com/downloads/down...3.52-1.i386.rpm
  存至/home/tmp目录   命令列表:


cd /home/tmp rpm -ivh MySQL-3.23.52-1.i386.rpm #安装mysql server rpm -ivh MySQL-client-3.23.52-1.i386.rpm #安装mysql client /usr/mysql/safe_mysqld & #启动mysql server mysql #运行mysql 客户端,并开放root用户的远程访问权限。以便调试 use mysql update user set host = '%' where user = 'root' and host <> 'localhost'; flush privileges; quit
  至此mysql安装完成
  2.apache   在如下页面下载apache的for linux 的源码包   http://www.apache.org/dist/httpd/apache_1.3.26.tar.gz   存至/home/tmp目录   命令列表:


cd /home/tmp tar -zxvf apache_1.3.26.tar.gz mv apache_1.3.26.tar.gz apache cd apache ./configure --prefix=/usr/local/apache --enable-module=so make make install
安装apache至/usr/local/apache 并配置apache支持dso方式
  3.php   在如下页面下载php的for linux 的源码包   http://www.php.net/get_download.php?df=php-4.2.3.tar.gz   存至/home/tmp目录   命令列表:


cd /home/tmp tar -zxvf php-4.2.3.tar.gz mv php-4.2.3.tar.gz php cd php ./configure --prefix=/usr/local/php --with-apxs=/usr/local/apache/bin/apxs --with-config-file-path=/usr/local/lib --enable-track-vars --with-xml --with-mysql make make install cp php.ini-dist /usr/local/lib/php.ini
以dso方式安装php至/usr/local/php 设置配置文件目录为/usr/local/lib 开启mysql,xml支持
  4.配置



vi /usr/local/apache/conf/httpd.conf 对apache做如下配置 #将ServerAdmin q3boy@younet.com一行改为您的邮箱地址
#DocumentRoot "/home/httpd/html/" 此处为html文件主目录
# 同上
#Options FollowSymLinks MultiViews 为安全起见,去掉"Indexes"
# # DirectoryIndex default.php default.phtml default.php3 default.html default.htm # #设置apache的默认文件名次序
#AddType application/x-httpd-php .php .phtml .php3 .inc #AddType application/x-httpd-php-source .phps #设置php文件后缀
  存盘退出


vi /usr/local/lib/php.ini #register-golbals = On
  存盘退出
  5.启动服务   /usr/local/apache/bin/apachectl start
  6.备注   apache在linux下的默认最大进程数为256,无论如何修改httpd.conf都不能超过这个限制。如果想加大这个限制,在编译apache前编辑/home/tmp/apache/src/include/httpd.h,将其中#define HARD_SERVER_LIMIT 256 一行改为#define HARD_SERVER_LIMIT 2048后再编译apache,
  apache 1.3.26中mod_so似乎已经不是默认模块了。编译时候需加上--enable-module=so,我第一次编译没加此参数,结果php编译时无法找到apxs
  php 4.2.3中默认配置文件路径似乎变了。编译时需加上 --with-config-file-path=/usr/local/lib 参数,我第一次编译完php.ini放了n个地方都没有用。不得已。只能加上这个参数。
  p.s. 不保证本文所述步骤适用于其他版本
  附:相关文件下载地址   php:   http://www.php.net/get_download.php?df=php-4.2.3.tar.gz   apache:   http://www.apache.org/dist/httpd/apache_1.3.26.tar.gz   mysql server:   http://www.mysql.com/downloads/down...3.52-1.i386.rpm   mysql client:   http://www.mysql.com/downloads/down...3.52-1.i386.rpm

------

回复此文章 |

话归正题,配置一个Windows的PHP调试环境是一件很简单的事情。下面是一个简单的例子(安装目录是C:\www\webserver)。本文采用Apache2.0.40、PHP4.23和Mysql3.23.52。如果没有该软件请到 www.google.com 搜索并且下载。
1)分别安装和Apache和Mysql--he安装过程需要输入网站域名,使用localhost即可;Mysql的root密码随便输入你想要的密码。
2)PHP解压到给定的目录C:\www\webserver\php43)修改Apache的配置文件,在最后一行加入:#PHP Configure ##BEGIN##ScriptAlias /php/ "C:\www\webserver\php4/"AddType application/x-httpd-php .php .php4 .php3AddType application/x-httpd-php .phtmlAction application/x-httpd-php "/php/php.exe"#PHP Configure ##END##4)把C:\www\webserver\php4下面的php.ini-dist改名为php.ini即可。5)新建文件index.php,内容如下<?phpinfo();?>将文件保存到apache安装目录的htdocs目录。
分别启动apache和mysql。打开浏览器访问http://localhost/index.php ,如果能看到系统配置信息,而且Mysql support的信息也能看到,那么恭喜你!!你的设置成功了。
如果只能看到“找不到网页”的信息,请重新检查你修改的配置文件有没有正确或者你的apache是否启动了。
注:本文在Windows XP 下测试成功。如果你在设置过程遇到问题,欢迎来我们论坛跟大家一起讨论。

hofman   2005-11-19 22:52:14 评论:0   阅读:2312   引用:0

发表评论>>

署名发表(评论可管理,不必输入下面的姓名)

姓名:

主题:

内容: 最少15个,最长1000个字符

验证码: (如不清楚,请刷新)

Copyright@2006 powered by YuLog