+ Reply to Thread
Results 1 to 5 of 5

Thread: PHP error/warning

  1. #1
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    PHP error/warning

    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


    The following are all the ways i use session variables. Maybe i am using one in a way the server does not like.
    Code:
    session_cache_expire(30);
    session_start();
    
    if (isset($_SESSION['var_name']))
    
    $var = $_session['var_name']

  2. #2
    descalzo's Avatar
    descalzo is offline Grim Squeaker descalzo has a brilliant futuredescalzo has a brilliant futuredescalzo has a brilliant future
    Join Date
    Jul 2009
    Location
    Ankh-Morpork
    Posts
    7,636

    Re: PHP error/warning

    Quote Originally Posted by driveflexfuel View Post

    session_cache_expire(30);
    session_start();

    if (isset($_SESSION['var_name']))

    $var = $_session['var_name']
    Should be capitalized.

    Add:

    If that doesn't eliminate the warning, try commenting out the session_cache_expire and see if that is causing the problem (debugging by elimination of suspects).

    Add again:
    The default for session_cache_expire is 180 minutes. Did you mean to make is smaller?
    Last edited by descalzo; 10-01-2009 at 12:05 PM.
    Nothing is always absolutely so.

  3. #3
    driveflexfuel is offline x10 Sophmore driveflexfuel is an unknown quantity at this point
    Join Date
    Jul 2008
    Posts
    159

    Re: PHP error/warning

    I did mean to make is smaller but that being the error i suppose ill just get rid of it

  4. #4
    xadrieth is offline x10Hosting Member xadrieth is an unknown quantity at this point
    Join Date
    Apr 2009
    Posts
    62

    Re: PHP error/warning

    The PHP also needs to look like this:
    PHP Code:
    ession_cache_expire(30);
    session_start();

    if (isset(
    $_SESSION['var_name']))
        
    $var $_SESSION['var_name']; 
    you could also get rid of the "isset()" and it should work the same.
    Last edited by xadrieth; 10-01-2009 at 04:29 PM. Reason: fixing grammer

  5. #5
    xav0989's Avatar
    xav0989 is offline Community Public Relation xav0989 is just really nice
    Join Date
    Jul 2008
    Location
    ifk
    Posts
    4,438

    Re: PHP error/warning

    You forgot the s in session_cache_expire(30);
    Xavier L | Community Public Relations Manager (Free Hosting Support)
    █ Yes, my position is too cool to even exist!
    How am I helping? Rate this post by clicking the icon below! (this is even better than "liking" a post)
    Terms of Service | Acceptable Use Policy | x10Hosting Wiki

+ Reply to Thread

Similar Threads

  1. Ever Been Suspended For Using PHP?
    By dragoneye_xp in forum Off Topic
    Replies: 26
    Last Post: 08-16-2009, 07:17 PM
  2. [PHP] Variables in PHP
    By Bryon in forum Tutorials
    Replies: 15
    Last Post: 01-29-2009, 09:46 AM
  3. currently have an application pending php
    By biomasti in forum Free Hosting
    Replies: 1
    Last Post: 09-03-2008, 01:58 PM
  4. php errors galore
    By DMG Online in forum Scripts & 3rd Party Apps
    Replies: 9
    Last Post: 05-17-2008, 06:23 AM

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