免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12下一页
最近访问板块 发新帖
查看: 3696 | 回复: 15
打印 上一主题 下一主题

[调试] Apache不支持header吗? [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-21 11:01 |只看该作者 |倒序浏览
.Apache不支持header吗?我在IIS里可以使用的PHP到APACHE中就不行了,
提示:
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, wfl@withub.org 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.

论坛徽章:
0
2 [报告]
发表于 2005-10-21 12:03 |只看该作者

[调试] Apache不支持header吗?

肯定支持.

论坛徽章:
0
3 [报告]
发表于 2005-10-21 12:34 |只看该作者

[调试] Apache不支持header吗?

那能说说我错在哪里了吗?PHP文件在IIS下可以很好的正常工作.而到APACHE下就不能用.是我Apache哪里忘设了吗?

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
4 [报告]
发表于 2005-10-21 12:59 |只看该作者

[调试] Apache不支持header吗?

1,你的php使用cgi还是mod方式?

2/把你的header贴上来

论坛徽章:
0
5 [报告]
发表于 2005-10-21 13:01 |只看该作者

[调试] Apache不支持header吗?

<?php
session_start();
?>;
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">;
<html>;
<head>;
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">;
<title>;欢迎进入上海交大慧谷管理系统</title>;
<style type="text/css">;
<!--
body {
        background-color: #CCCCFF;
        margin-left: 0px;
        margin-top: 0px;
}
.style1 {color: #FF6600}
-->;
</style>;
<body>;
<h2 class="style2 style1">; <img src="logo.gif" width="120" height="68">;</h2>;
<h2 align="center" class="style2 style1">;上海交大慧谷培训中心管理系统 </h2>;
<hr width="100%" size="1">;
<table border="0" colspan="1" align="center">;
<form action="./admin/login.php" method="post">;
<tr>;
<td width="64">;<strong>;Username </strong>;</td>;
<td width="117">;<input type="text" name="username" size="20" maxsize="50">;</td>;
</tr>;
<tr>;
<td>;<strong>assword </strong>;</td>;
<td>;<input type="password" name="password" size="20" maxsize="50">;</td>;
</tr>;
<tr>;
<td colspan="2">;
<input name="input1" type="submit" value=" login ">;
</form>;
</table>;
<center>;
<?php
$_SESSION["permit"]=0;
if(isset($_GET["err"])){
echo "<font color=red >;";
echo $_GET["err"];
echo "</font>;";
if(isset($_SESSION['count'])){echo "您还有<font color=red size=6>;";echo $_SESSION['count'];echo "</font>;次机会";}
}
?>;
</center>;
<br>;
<hr width="100%" size="1">;
<div align="center">;
Copyright@Withub.com All Rights Reserved
</div>;
</body>;
</html>;

论坛徽章:
0
6 [报告]
发表于 2005-10-21 13:02 |只看该作者

[调试] Apache不支持header吗?

//这是login.php
<?
session_start();
$_SESSION["permit"]=0;
if(!isset($_SESSION['count'])){$_SESSION['count']=10;}
if($_SESSION['count']<=0){$_SESSION["permit"]=0;echo "<center>;<font color=red size=6>;禁止登录!</font>;</center>;";
exit;}
import_request_variables("gp","lg_";
if ($lg_username == ""
{
$err="请正确输入用户名!";
echo '<script>;
window.location="../index.php?';
echo "err=$err";
echo '"</script>;';
}
else{
$connect=mysql_connect("localhost", "root", ""
        or die ("Unable to connect to server.";
mysql_select_db("withub"
        or die ("Unable to select database.";
$password=md5($lg_password);
$sql = "SELECT id FROM admin
        WHERE admin_name='$lg_username' and password='$password'";
$result= mysql_query($sql);
$num = mysql_num_rows($result);
if($num==0) {
$_SESSION['count']--;
$err="未授权用户,请正确输入用户名和密码!";
echo '<script>;
window.location="../index.php?';
echo "err=$err";
echo '"</script>;';
}
if($num != 0)
{
$sqltype = "SELECT type FROM admin
        WHERE admin_name='$lg_username' and password='$password'";
$resulttype=mysql_query($sqltype) or die("cannt query type!";
$type=mysql_result($resulttype,0,"type";
$_SESSION["username"]=$lg_username;
$_SESSION["permit"]=1;
$_SESSION["type"]=$type;
echo '<script>;
window.location="index.php";
</script>;';
}
}
?>;

论坛徽章:
1
技术图书徽章
日期:2013-12-05 23:25:45
7 [报告]
发表于 2005-10-21 13:03 |只看该作者

[调试] Apache不支持header吗?

你的header是什么?

论坛徽章:
0
8 [报告]
发表于 2005-10-21 13:16 |只看该作者

[调试] Apache不支持header吗?

晕.太着急了,发错了...
这里也想问,以上IIS中可以用,在Apache中也不能用,难道apache不支持url传变量?也是就是这种,用get
echo '<script>;
window.location="../index.php?';
echo "err=$err";
echo '"</script>;';

论坛徽章:
0
9 [报告]
发表于 2005-10-21 13:19 |只看该作者

[调试] Apache不支持header吗?

晕.太着急了,发错了...
这里也想问,以上IIS中可以用,在Apache中也不能用,难道apache不支持url传变量?也是就是这种,用get
echo '<script>;
window.location="../index.php?';
echo "err=$err";
echo '"</script>;';

论坛徽章:
0
10 [报告]
发表于 2005-10-21 14:42 |只看该作者

[调试] Apache不支持header吗?

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"
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP