Forum Moderators: coopster

Message Too Old, No Replies

passing data between pages - not working

can I fix it in htaccess? php.ini?

         

sanblasena

12:50 pm on Dec 29, 2005 (gmt 0)

10+ Year Member



Hi, I have several sites on a reseller account that pass data between pages in the url. This has suddenly stopped working and my receiving pages are no longer getting the data. I have had this happen before and it has always been with a new release on my server when they set one of the parameters wrong. My problem this time is that the support center has not answered my emails for 3 days. Is there some way I can fix this problem myself by using some code in HTACCESS or PHP.INI? Thanks in advance for your help.

Pat

sonjay

2:23 pm on Dec 29, 2005 (gmt 0)

10+ Year Member



It would be helpful if you gave more information about how the information is supposed to be passed and how it's being retrieved, and what kind of error messages you get when it fails.

Nevertheless, I'd guess that your problems is that "register_globals" is turned off. PHP has had register_globals turned off by default for quite a few releases now, because of security issues. It's likely that updates to php would result in register_globals being turned off.

Your best course of action would be to rewrite your script to work with register_globals off: If you have a URL with, say, example.com?myvar=yes you would access that variable using $_GET['myvar'] rather than just $myvar. With register_globals ON you can access it using just $myvar.

Rewriting for register_globals off would not only help your script be more secure, but would also protect you against future upgrades and the same thing happening again and again.

Nevertheless, if you choose not to recode, you can turn register_globals on for your own site by putting this in your .htaccess file:
php_flag register_globals on
(assuming, of course, that you can use .htaccess files.)

sanblasena

4:14 am on Dec 30, 2005 (gmt 0)

10+ Year Member



Sonjay, I changed my htaccess file as you suggested and it works. Thank you so much. Pat