FRIHOST FORUMS SEARCH FAQ TOS BLOGS COMPETITIONS
You are invited to Log in or Register a free Frihost Account!


.htaccess Problem With Register_Globals





smokey4life
Hello i have read the entire post about the register_globals being turned off. However i am in desperate need of this for my website and game, I have tried the .htaccess file to enable it, however this does not seem to work at all for me. I have made sure of no whitespaces and no misspelling but still i get nothing also i have chmoded it to 755, does the chmod even matter in these cases? Any help is much appreicated as i need to get this working as soon as possible. Thanks in advance!
SpellcasterDX
Ah, I know the solution to this problem.
Add this line to your .htaccess file:

Code:
php_flag register_globals on

Also, file permission for your .htaccess file should be 644.
smokey4life
If you actually took the time to read the post you would see that i said i have already tried that and it did not correct this problem. Also does this .htaccess file need to be in every folder within the site or does it effect the entire site if its within the root folder?
Daniel15
Quote:
lso does this .htaccess file need to be in every folder within the site or does it effect the entire site if its within the root folder?

If you put it into your root public_html directory, it will effect all the directories below that.

My suggestion would be to try and recode your scripts so that register_globals is not needed (it's a security risk anyways). So, for example, this would mean using $_GET['id'] as opposed to $id. Maybe, setting all the variables at the top of the script would solve your problem?
SpellcasterDX
Sorry, but I didn't understand what you meant by "I have tried the .htaccess file to enable it, however this does not seem to work at all for me."
Bondings
It should be working without any problems. Try to put it in all folders maybe.
smokey4life
Ok it has been months and months now and yet as many people as there are here i have yet to find help on this issue....I have tried the .htaccess file in every folder and YES it is spelled and everything is correct i have checked it over and over again so that simply is not working i have even tried to add
Code:
$page = $_GET["page"];
to the beginning of the scripts that call this in order to eliminate the need for register_globals to be on....none of this seems to work i cannot get my game abck up and running for the life of me and i have allready lost wayy too many precious regulars. Please im begging someone help me please! Thanks in advance.
SpellcasterDX
smokey4life wrote:
Ok it has been months and months now and yet as many people as there are here i have yet to find help on this issue....I have tried the .htaccess file in every folder and YES it is spelled and everything is correct i have checked it over and over again so that simply is not working i have even tried to add
Code:
$page = $_GET["page"];
to the beginning of the scripts that call this in order to eliminate the need for register_globals to be on....none of this seems to work i cannot get my game abck up and running for the life of me and i have allready lost wayy too many precious regulars. Please im begging someone help me please! Thanks in advance.

I think it's
Code:
$page = $_GET['page'];

with single quotes, not double quotes. That may or may not make a difference.

Anyway, well, I honestly can think of any other way to help you. Perhaps your account is glitched.
pashmina
Thank for the information regarding global_registry
I managed to flag off it
MrBlueSky
SpellcasterDX wrote:

I think it's
Code:
$page = $_GET['page'];

with single quotes, not double quotes. That may or may not make a difference.



No, that doesn't matter

smokey4life wrote:
Ok it has been months and months now and yet as many people as there are here i have yet to find help on this issue....I have tried the .htaccess file in every folder and YES it is spelled and everything is correct i have checked it over and over again so that simply is not working i have even tried to add
Code:
$page = $_GET["page"];


Using $_GET will of course not help you when the data is supplied by a POST-form or a cookie.

You can try something like:

Code:


if (isset($_REQUEST["foo"])) {
  $bar = $_REQUEST["foo"];
}



Another approach is to 'emulate' register_globals by putting this code at the beginning of your script:

http://www.daniweb.com/code/snippet484.html wrote:

<?php
// Emulate register_globals on
if (!ini_get('register_globals')) {
$superglobals = array($_SERVER,$_ENV, $_FILES, $_COOKIE, $_POST, $_GET);
if (isset($_SESSION)) {
array_unshift($superglobals, $_SESSION);
}
foreach ($superglobals as $superglobal) {
extract($superglobal, EXTR_SKIP);
}
ini_set('register_globals', true);
}
?>


Maybe you can post the script that doesn't work without register_globals, so we can look at it to see why it doesn't work.
Related topics
.htaccess problem
htaccess problem again
secure subdomain .htaccess problem.
Register_globals
40Frih for Help with .htaccess problem
.htaccess problem
htaccess Problem
Wordpress htaccess problem
Solve this HTML mystery for 20Frih$
Philippines Freelance Web Link Exchange
Image linking within my site seems to not be working
Error 500 when turning off register_globals (server 1)
.htaccess Problem - PLEASE help - Reward Offered
.htaccess problem in wordpress
Reply to topic    Frihost Forum Index -> Support and Web Hosting -> Web Hosting Support

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2011 Frihost, forums powered by phpBB.