+ Reply to Thread
Results 1 to 3 of 3

Thread: PHP Global Variables Problem

  1. #1
    jmg498 is offline x10Hosting Member jmg498 is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    2

    PHP Global Variables Problem

    In one of my scripts, I do the following:

    Code:
    session_start();
    $location = $_GET['location'];    
    $radar = $location;
    $_SESSION['radar'] = $radar;
    $location comes in from a webform. Then when I use $radar in another script that is called, it doesn't work and I get the following error:

    Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0

    Any help would be greatly appreciated.

  2. #2
    diabolo's Avatar
    diabolo is offline Community Advocate diabolo is on a distinguished road
    Join Date
    Nov 2007
    Location
    Jersey Shore
    Posts
    1,683

    Re: PHP Global Variables Problem

    what PHP ver. do you have?

  3. #3
    jmg498 is offline x10Hosting Member jmg498 is an unknown quantity at this point
    Join Date
    Feb 2009
    Posts
    2

    Re: PHP Global Variables Problem

    Global vars is turned off on my account so that explains the problem. I figured out a work around. Essentially, in the one script I used $location = $_GET['foo'] and in the other script I put "script.php?foo=.'$location.'";

    All is working well now.

    Thanks!

+ Reply to Thread

Similar Threads

  1. Places to learn php
    By JaWasabi in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 01-13-2009, 02:03 AM
  2. PHP Upgrade Problem
    By cclworld in forum Free Hosting
    Replies: 4
    Last Post: 12-27-2008, 10:34 AM
  3. Replies: 3
    Last Post: 03-10-2008, 12:22 PM
  4. Problem with PHP support ticket system (Fantastico)
    By Jarryd in forum Free Hosting
    Replies: 4
    Last Post: 03-10-2008, 01:35 AM
  5. "PHP Startup: Invalid Library" - Interesting error
    By javaguy78 in forum Free Hosting
    Replies: 5
    Last Post: 03-27-2007, 02:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers