【发布时间】:2011-06-15 06:56:12
【问题描述】:
我遇到了这样的问题:
403 Forbidden on PHP page called with url encoded in a $_GET parameter
我收到“403 禁止”错误 当我像这样将 url 作为 GET 变量传递时
http://script/test.php?url=https://stackoverflow.com/questions/ask
但这没关系。
http://script/test.php?url=stackoverflow.com/questions/ask
即使我对 url 进行 urlencode,它仍然会给我一个 403。
Apache mod_fcgid/2.3.6 mod_auth_passthrough/2.1 mod_bwlimited/1.4 FrontPage/5.0.2.2635 服务器在 ----- 端口 80
而且我认为这个服务器没有启用 mod_security,因为当我在 htaccess 中添加 SecFilterEngine Off 时,我得到“500 Internal Server Error”。
代码sn-p:
$URL = mysql_real_escape_string($_GET['url']);
mysql_query("INSERT INTO `url` ...");
所以问题是,我可以在不编辑 httpd.conf 的情况下解决这个问题吗,因为我没有 root 权限。 谢谢
【问题讨论】:
-
显示 test.php 文件中的一些代码
-
先生,我添加了它,但我怀疑它是否相关,我用另一个文件尝试了它。