![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
salad tossing sig guy
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
|
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 ![]() 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? |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Join Date: Sep 2002
Location: Canada
Posts: 433
|
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.
__________________
![]() ----------- Free automated way to rotate sponsor gallery thumbnails on your sites TgpWizards - Free TGP Gallery submission system |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Confirmed User
Join Date: May 2002
Location: Oslo, Norway
Posts: 748
|
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.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
So Fucking Banned
Join Date: Jun 2002
Posts: 2,640
|
who is php?!
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
So Fucking Banned
Join Date: Jun 2002
Posts: 2,640
|
naw thats a dumb question
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
salad tossing sig guy
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
|
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 ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Confirmed User
Join Date: Feb 2002
Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: Location: isN'T everything
Posts: 5,394
|
Whenever PHP acts up, always check your php.ini
__________________
SIG TOO SMALL! Maximum 1200x600 button and no more than 30 text lines of ALL SIZES and COLORS. Unless your sig is for a GFY top banner sponsor, then you may use a 6240x4800 instead of a 1024x800. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#8 |
Confirmed User
Join Date: Aug 2002
Posts: 160
|
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. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 |
salad tossing sig guy
Join Date: Apr 2002
Location: mrthumbs*gmail.com
Posts: 11,702
|
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.. ![]() ![]() ![]() |
![]() |
![]() ![]() ![]() ![]() ![]() |