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 12 3234
In article <11**********************@z14g2000cwz.googlegroups .com>, ae*****@gmail.com wrote: 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
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...
Use the ini_set() function to change the values of the variables.
Thanks
Shabbir Bhimani sh************@gmail.com wrote: Use the ini_set() function to change the values of the variables.
Thanks Shabbir Bhimani
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.
:)
Yes, this did the trick! Thanks!!
setting php_flag register_globals off in the .htaccess file caused a
500 error for some reason!
Thanks to all that replied. ae*****@gmail.com wrote: Yes, this did the trick! Thanks!!
setting php_flag register_globals off in the .htaccess file caused a 500 error for some reason!
Thanks to all that replied.
Possibly because PHP isn't being run as a module, but rather in CGI
mode... At least that might explain why mod_php4.c is commented out.
Another option is that it may not be an Apache server...
--
Justin Koivisto, ZCE - ju****@koivi.com http://koivi.com
For the record, PHP's ini_set() function cannot be used to change the value
of register_globals at run-time. http://us2.php.net/manual/en/ini.cor...gister-globals
ECRIA http://www.ecria.com
<sh************@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com... Use the ini_set() function to change the values of the variables.
Thanks Shabbir Bhimani
It is an apache server for sure. In any case, putting php.ini in the
root folder is the best solution as I can tweak it as I please :D
This is what I did and it works flawlessly. Problem is is now it is
accessible to the www. Is there a way to put it somewhere else not
accessible by apache, but where php can read it?
Rob wrote: sh************@gmail.com wrote: Use the ini_set() function to change the values of the variables.
Thanks Shabbir Bhimani
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.
:)
Yes, thanks. As I said earlier, this works. Problem is is now it is
accessible to anyone who care to check for it: http://servername/php.ini. I would say that this is probably a security
risk? (not sure). Is there a way to put it somewhere else not
accessible by apache, but where php can read it? I tried changing the
permissions on the file, but that has not helped.
Thanks,
Ahmed El-Daly This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Useko Netsumi |
last post by:
in php.ini? Thank
|
by: wonder |
last post by:
Hi,
The CRM application said that need to add an option
"REGISTER_GLOBALS=On" to the php.ini file, so I did what it told.
But I still can't get rid off the following error:
The PHP variable...
|
by: news |
last post by:
You'd think it'd be easier to find the answer to this question.
Did a search, and all I can find is people asking why something's not
working and people replying it's because register_globals is...
|
by: peter |
last post by:
I just took over the website at work. I am still learning PHP.
Register_globals are on and the script appears to be coded to take
advantage of this. I know how to recode the script, but am unsure...
|
by: Angelos Devletoglou |
last post by:
Hi...
It drives me nuts this server.
My php.ini says that register_globals is OFF and when I run phpinfo() it
says they are ON.
I restarted both httpd and the whole server still nothing.
IS...
|
by: Samuel Shulman |
last post by:
I keep getting the
'FATAL ERROR: register_globals is disabled in php.ini, please enable it!'
error
I changes that settings and I still get this error
What should I do next?
Thank you,...
|
by: Dave |
last post by:
In PHP 4.4, what is the most secure server configuration while keeping
REGISTER_GLOBALS on?
|
by: bnashenas1984 |
last post by:
Hi everyone
I'v been working on my scripts more that 5 months using Microfoft IIS on windows XP. As default the ( register_globals ) was ON ( php.ini ) and that means I didnt need to use ( $_request...
|
by: +mrcakey |
last post by:
I understand that register_globals was turned off by default as, unless
you initialised it, it could be altered by a malicious coder.
What I don't understand is how the $_POST form is any more...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
| |