![]() |
dumb php question
just moved our databases to a new server
running the latest version of php and mysql. Expected to run into a lot of shit but none of that until this little fucking issue came up. And im TIRED and not in the fucking mood. Everything works but for some reason php doesnt allow me to pass variables through the url (which is quite essential :Graucho) www.bla.com/bla.php?var=hello well.. content bla.php: <? echo $var; ?> $var is empty instead of 'hello'. How do i enable this and why the fuck is this disabled? |
If you're using PHP 4.2+ you either need to alter the php.ini to have global variables enabled, or you need to change your PHP scripts around to initially grab the variables
In regards to your example http://www.bla.com/bla.php?var=hello the line $var = $_GET["var"]; would give the variable $var the value of hello. |
I remember my programmer dude tell me to tell my host to have them compile "php with globals on" whatever that means. He said this was essential for var passing.
|
who is php?!
|
naw thats a dumb question
|
aha.. so global variables are stored in an array for the new php versions! Ok.. thanks.. that makes sense.. let me see if i can change the .ini on the fly.
REALLY appreciate that reply. thanks :thumbsup |
Whenever PHP acts up, always check your php.ini
|
The value 'hello' would be stored in: $_GET['var']
I new versions of PHP(4.2+) has register_globals in php.ini disabled to encourage 'good' programming. Edit php.ini: register_globals = On and it should be behave as expected. |
yep.. just figured that out.. thanks!
thought this would turn out in a nightmare but it's fixed and everything works stable and fine now.. Running through the final tests and getting some sleep!! thanks..:thumbsup :thumbsup :thumbsup |
All times are GMT -7. The time now is 09:00 PM. |
Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123