|
|
It broke my web apps
In PHP 4.2.0 global variables are accessed very differently. In previous versions, if you passed in a GET variable to a script it was automatically available everywhere in your script, most old PHP is written based on this assumption. This is no longer the default behavior. One way to fix most of the problems with the new variable structure is to just turn the old way back on. Although you won't have the new added security from PHP 4.2.0, it can offer you a transitional phase while you update your code.
To make the old global variable structure work again you just edit your php.ini file in /usr/local/lib (create it if it doesn't exist) and change or add the line:
register_globals=on
This gives you a chance to change all your $random_get_var to $_GET["random_get_var"] (or just pop something this at the beginning of your code: $random_get_var = $_GET["random_get_var"];).
Hope that helps
Jeremy Gustie
http://www.gustie.com:1313/
It broke my web apps
Thank you for this information. I had suspected that my problem was centered around this change (globals) but with my limited knowledge, I was not sure. I also appreciate your help with the temporary fix as well as the recoding help.
It broke my web apps
Regarding, creating the php.ini file. Is there anything else that would need to go into this file other than the one line regarding globals? Will it affect the configuration of php other than the globals?
It broke my web apps
Regarding, creating the php.ini file (which I don't have now). Is there anything else that would need to go into this file other than the one line regarding globals? Will it affect the configuration of php other than the globals? |
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|