my code isn't working after php upgrade to 5.2.9

Discussion in 'PHP' started by kathym, Aug 25, 2009.

  1. #1
    Hi,

    I have 2 php files:
    - ac.php
    - upload.php

    This code was working prior to an upgrade. The link is
    http://backup.hoechtgalvin.ca.

    The ac.php prompts the user to login and if it passes the test,
    it moves the user over to the upload.php file.

    Since the upgrade, it appears the variables are not being
    set (userid and password).

    Any help would be appreciated. I can't figure out what is wrong.

    The weird thing is that this code works on a windows version, but
    not linux
     

    Attached Files:

    kathym, Aug 25, 2009 IP
  2. GreenWithEnvy

    GreenWithEnvy Active Member

    Messages:
    125
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    53
    #2
    What error is displayed?
     
    GreenWithEnvy, Aug 25, 2009 IP
  3. kblessinggr

    kblessinggr Peon

    Messages:
    539
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Are you by any chance using register_globals? if so thats insecure and turned off on most newer versions of PHP builds by default (or least by default in their ini file).

    Are you retrieving the variables by means of $_GET, $_POST or $_REQUEST (which is the modern way to do it)?

    I'm assuming you are using register_globals because at the top of the file:
    
    <?
    include "config.php";
    session_start();
    if ($logout=="true") { $_SESSION = array(); unset($logname); unset($userid); unset($u_level); unset($logout); header ("Location: upload.php");}
    ...
    
    PHP:
    unless you set $logout from $_GET['logout'] in the config.php, its not going to have a value with register_globals turned off.

    Try saving a file with <? phpinfo(); ?> in it, run it to see what your actual values are (your ini shows register_globals is on, but if its not being loaded, its possible there's a diff ini file taking over) I would recommend against having register_globals on anyways.
     
    kblessinggr, Aug 25, 2009 IP