关闭共享服务器上的register_globals [英] turn off register_globals on a shared server

查看:54
本文介绍了关闭共享服务器上的register_globals的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,


我的共享服务器提供商已打开register_globals。我检查了运行

php_info();来自文件。我想关闭它,但是

要求他们关闭它只是为了我不会工作。


我尝试将以下行添加到.htaccess文件:

< IfModule mod_php4.c>

php_flag register_globals off

< / IfModule>

但是没有用。我想也许这个文件被称为

别的东西,我在服务器上的任何地方都找不到包含mod_php

的文件。另外,我可以看到

mod_php4.c的addmodule行在httpd.conf文件中注释掉了共享的

服务器。


我不知道服务器如何服务php如果该行被评论

out?


底线是:是.htaccess接近正确的一个?并且

任何人都知道我如何知道我是否使用了正确的文件名?


phpinfo()说我有PHP版本4.3.11


我将在主页面上运行phpinfo(),这样如果有人需要更多信息,他们可以在linux-place.com找到它。 />

谢谢,

Ahmed El-Daly

linux-place.com

Hello all,

My shared server provider has register_globals on. I checked by running
php_info(); from within a file. I would like to turn this off, but
asking them to turn it off just for me will not work.

I tried adding the following lines to the .htaccess file:
<IfModule mod_php4.c>
php_flag register_globals off
</IfModule>
but that did not work. I thought that maybe the file is called
something else, and I could not find any file containing mod_php
anywhere on the server. Also, I can see that the addmodule line for
mod_php4.c is commented out in the httpd.conf file for the shared
server.

I do not know how the server can serve php if that line is commented
out?

Bottom line is: is the .htaccess approach the correct one? and does
anyone know how I can find out if I am using the correct filename?

phpinfo() says that I have PHP Version 4.3.11

I will leave phpinfo() running on the main page so that if someone
needs more information, they can find it at linux-place.com

Thanks,
Ahmed El-Daly
linux-place.com

推荐答案

在文章< 11 ********************** @ z14g2000cwz.googlegroups .com> ;,
ae*****@gmail.com 写道:
In article <11**********************@z14g2000cwz.googlegroups .com>,
ae*****@gmail.com wrote:
大家好,

我的共享服务器提供程序上有register_globals。我检查了运行
php_info();来自文件。我想关闭它,但是要求他们为我关闭它不会起作用。

我尝试将以下行添加到.htaccess文件中:
< IfModule mod_php4.c>
php_flag register_globals off
< / IfModule>
但是没有用。我想也许这个文件被称为
其他东西,我在服务器上找不到任何包含mod_php
的文件。另外,我可以看到
mod_php4.c的addmodule行在共享
服务器的httpd.conf文件中被注释掉了。

我不知道服务器是怎么回事可以服务php如果该行被评论
了吗?

底线是:.htaccess方法是正确的吗?并且有没有人知道如果我使用正确的文件名我怎么知道?

phpinfo()说我有PHP版本4.3.11

我将使phpinfo()在主页面上运行,这样如果有人需要更多信息,他们可以在linux-place.com找到它。

谢谢,
Ahmed El-Daly
linux-place.com
Hello all,

My shared server provider has register_globals on. I checked by running
php_info(); from within a file. I would like to turn this off, but
asking them to turn it off just for me will not work.

I tried adding the following lines to the .htaccess file:
<IfModule mod_php4.c>
php_flag register_globals off
</IfModule>
but that did not work. I thought that maybe the file is called
something else, and I could not find any file containing mod_php
anywhere on the server. Also, I can see that the addmodule line for
mod_php4.c is commented out in the httpd.conf file for the shared
server.

I do not know how the server can serve php if that line is commented
out?

Bottom line is: is the .htaccess approach the correct one? and does
anyone know how I can find out if I am using the correct filename?

phpinfo() says that I have PHP Version 4.3.11

I will leave phpinfo() running on the main page so that if someone
needs more information, they can find it at linux-place.com

Thanks,
Ahmed El-Daly
linux-place.com




将以下内容放在主页根目录下的.htaccess文件中:


php_flag register_globals off

php_flag safe_mode on

选项-Indexes


-

DeeDee,别按下那个按钮!迪迪!没有! Dee ...



put the following in the .htaccess file in the root of your main page:

php_flag register_globals off
php_flag safe_mode on
Options -Indexes

--
DeeDee, don''t press that button! DeeDee! NO! Dee...


使用ini_set()函数来改变变量的值。


谢谢

Shabbir Bhimani

Use the ini_set() function to change the values of the variables.

Thanks
Shabbir Bhimani


sh ************ @ gmail.com 写道:
使用ini_set()函数更改变量的值。

谢谢
Shabbir Bhimani
Use the ini_set() function to change the values of the variables.

Thanks
Shabbir Bhimani




或者您可以将自己的php.ini上传到共享的根目录

网页空间。

PHP总是检查文档根目录中的php.ini

在别处检查。


:)



alternatively you can upload your own php.ini to the root of your shared
web space.
PHP always checks for php.ini in the root of the document before it
checks elsewhere.

:)


这篇关于关闭共享服务器上的register_globals的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆