sheriffonline

Registered
Nov 29, 2006
1
0
151
Hello,

I am new one using WHM cpanel. Please support me that how to Switch REGISTER_GLOBALS ON from REGISTER_GLOBALS OFF from my server WHM Cpanel.

Thankx
Sheriff
 

HelloAdam

Well-Known Member
Nov 6, 2005
145
0
166
Hey,

You would have to edit your PHP.ini file, which is located in


/usr/local/Zend/etc/
(guessing you have Zend installed)

PM if you would like for me to do this for a small fee...

From,
Adam
 

AndyReed

Well-Known Member
PartnerNOC
May 29, 2004
2,217
4
193
Minneapolis, MN
I am new one using WHM cpanel. Please support me that how to Switch REGISTER_GLOBALS ON from REGISTER_GLOBALS OFF from my server WHM Cpanel.
Usin your favorite Unix editor, view /usr/lib/php.ini
and change register_globals = Off to register_globals = On
Then restart apache
 

carluk

Well-Known Member
Sep 2, 2003
161
0
166
Fastest way to find your php.ini location is to do this:
Code:
php -i | grep php.ini
You'll get an output like:
Configuration File (php.ini) Path => /usr/local/Zend/etc/php.ini

Thus your php.ini is /usr/local/Zend/etc/php.ini

Then:
Code:
pico -w /usr/local/Zend/etc/php.ini
Press CTRL and W and enter "register_globals ="
Changing the text under the comment block of text from:
register_globals = Off
to
register_globals = On

Then CTRL and X to exit and hit Y when asked to save. Then you need to restart httpd assuming your using php as module.

Code:
/scripts/restartsrv_httpd
It should be noted register globals isn't a good idea to have enabled and is completely removed in php 6.
 

jlindenbaum

Member
Mar 29, 2006
6
0
151
If I were you, I wouldn't do that.

register_globals is going to be deleted in PHP 6.
And basically it's bad coding. If you use auto global variables, you're not understanding the concept of $_POST and $_GET and other system variables.

If you're trying to install osCommerce for a customer. Tell him to use a different shop.

Register_globals is a security breach.

I advise you to leave it set to default off. Your customer can change register_globals setting on runtime by creating a .htaccess and entering:

php_flag register_globals 1


Again, I advise you to leave register_globals set to 0 or Off.
http://ca.php.net/register_globals - Read. Even PHP admits register_globals is misused for code injections.

Regards,
Johannes Lindenbaum