madhukar_garg Posted June 5, 2007 Share Posted June 5, 2007 Dear members, please help me. i am getting register_globals setting disabled warning. i have attached a .htaccess file with my catalog folder, i have also attached php.ini file with my catalog folder. my .htaccess file has code given below <IfModule mod_php4.c> php_value include_path ".:/usr/local/lib/php" php_admin_flag safe_mode on php_value register_globals on </IfModule> my php.ini file have code given below register_globals = ON i have done a lot of afforts. i have read existing topics on same problem and try for solution. but my problem is still same. i need urgent help please Thanks in advance madhukar garg Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted June 5, 2007 Share Posted June 5, 2007 You shouldn't be writing code that needs register_globals to be enabled. Why do you think you need it enabled? Enabling register_globals can open up a BIG security hole in your code. Ken Quote Link to comment Share on other sites More sharing options...
madhukar_garg Posted June 5, 2007 Author Share Posted June 5, 2007 hi ken, i am working on a oscommerce site. i am using oscommerce 2.2. and it need to enable register globals setting. please let me know how can i enable register_globals. thanks Madhukar Garg Quote Link to comment Share on other sites More sharing options...
taith Posted June 5, 2007 Share Posted June 5, 2007 the settings in your php.ini... and you prolly need to restart your server after changing that :-) Quote Link to comment Share on other sites More sharing options...
madhukar_garg Posted June 5, 2007 Author Share Posted June 5, 2007 hi taith, all of the thinks is going smoothly on my local host. the problem is generates on my host server because it has php 4+. Quote Link to comment Share on other sites More sharing options...
zell11 Posted June 5, 2007 Share Posted June 5, 2007 if you are using shared hosting ie the one you pay to hold your website on that you don't own. You will have to talk to your hosts. Some hosts allow you to add a php.ini file into your dir which changes the settings for that dir. Also I agree with kenrbnsn try and keep away from registered globals as much as you can as they can be very risky Quote Link to comment Share on other sites More sharing options...
taith Posted June 5, 2007 Share Posted June 5, 2007 agreed... register globals===bad Quote Link to comment Share on other sites More sharing options...
madhukar_garg Posted June 5, 2007 Author Share Posted June 5, 2007 then what will be solution for my problem. Quote Link to comment Share on other sites More sharing options...
taith Posted June 5, 2007 Share Posted June 5, 2007 leave it off, fix the program... lol Quote Link to comment Share on other sites More sharing options...
per1os Posted June 5, 2007 Share Posted June 5, 2007 I always thought OSCommerce gave you the option to have register_globals on. Anyhow a quick way to compensate for it, which I am not telling you is the correct way to do it or that you should even do it. But on a file that is always called add something like this: <?php if (isset($_POST)) { extract($_POST); } if (isset($_GET)) { extract($_GET); } if (isset($_COOKIE)) { extract($_COOKIE); } ?> Well you get the idea. If that is true about oscommerce, wow. What a shitty job for an open-source solution. Again, use the above code at your own risk. Quote Link to comment Share on other sites More sharing options...
Dragen Posted June 5, 2007 Share Posted June 5, 2007 Hi I'm running an oscommerce sight and globals on are very bad! You should use this contrib: http://www.oscommerce.com/community/contributions,2097/category,all/search,register_globals It changes how oscommerce works so you don't need globals on. In fact if you have them on, then oscommerce wont work. Hopefully it'll be made part of the default installation when the next version comes out. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.