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.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 01-12-2003, 03:36 AM   #1
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
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?
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:39 AM   #2
Apollo
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.
Apollo is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:41 AM   #3
Madball
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.
Madball is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:43 AM   #4
stanton
So Fucking Banned
 
Join Date: Jun 2002
Posts: 2,640
who is php?!
stanton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:43 AM   #5
stanton
So Fucking Banned
 
Join Date: Jun 2002
Posts: 2,640
naw thats a dumb question
stanton is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:44 AM   #6
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
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
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 03:49 AM   #7
Triple 6
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.
Triple 6 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 06:04 AM   #8
Bad B0y
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.
Bad B0y is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 01-12-2003, 06:27 AM   #9
mrthumbs
salad tossing sig guy
 
mrthumbs's Avatar
 
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..
mrthumbs is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.