红包
◆ [2024-4-19 星期五 0:45] ◆ 您来自:3.128.78.41,欢迎您访问風雲工作室。 收藏本站 ◆ | ◆ 设为首页
联系站长(腾讯QQ)
5029111 [風雲]
站长当前离线
首  页 论坛交流 游戏频道 无忧脚本 旧版论坛 云服务器 聊 天 室 自助链接 来访记录 访客留言 搜索提供
位置:風雲工作室 - 论坛交流 - 技术专栏 - 后台开发 - [PHP]Apache 2.2 + Php 5.1 安装问题解决 返回
主题:[PHP]Apache 2.2 + Php 5.1 安装问题解决
Rimifon
★☆☆☆☆☆☆☆☆☆
积分:285
发帖:317
登录:2024/3/26
注册:2006/6/28
(1楼)[PHP]Apache 2.2 + Php 5.1 安装问题解决
安装好Apache 2.2 和 Php 5.1后,在默认的设置下是无法正常工作的,按照网络教程配置好以后(注:这里php配置成CGI形式),有时仍会遇到一些问题。

问题:运行php文件时,出现提示“No input file specified.”

解决:将php.ini中的 doc_root 注释掉或者正确设置它的值为网站的根目录。

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

问题:运行php文件时,无任何显示或显示不正常。

解决:可能是php.ini中的 extension_dir 设置不正确,没有加载需要的模块,一般可改为"./ext/",然后搜索"extension="将需要的模块取消注释。

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

问题:session 无法使用。

解决:修改php.ini中的 session.save_path,将其值改为有效的目录,如"c:/windows/temp",注意是分隔符 是"/"。

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

问题:运行php文件时,出现如下错误:

您无权查看该网页
您可能没有权限用您提供的凭据查看此目录或网页。
... ...
HTTP 错误 403 - 禁止访问
解决:Apache2.2默认设置有误,修改如下:


Options FollowSymLinks
Allow from all #修改
Order Allow,Deny #修改
AllowOverride None
Satisfy all

重起Apache试试。

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

问题:运行php文件时,出现如下错误:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, admin@synchrotimes.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

Apache 日志文件(error.log)中有如下提示:

Premature end of script headers: php.exe, referer: http://localhost/index.php
解决:按照网络教程设置,一般要在Apache的配置文件httpd.conf中加入下面这一行


时间:2006年10月23日 14:42:39 IP:已记录 引用 回复

© Copyright 2006-2024,風雲工作室 All rights reserved.
湘ICP备05009306号QQ登录
操作 1 个库,连接 2 次,执行 7 次,耗时 141 毫秒。