Results 1 to 8 of 8
  1. #1
    Join Date
    Jul 2006
    Posts
    232

    php session problems

    Two clients complained about php session problems yet not sure how to duplicate as I see php itself functioning fine:

    #1

    The first problem is PHP start_session is not setting the PHPSESSID and php url arguments are not set in the webserver processing the php pages.

    For example: somepage.php?x=1
    <?php echo $x; ?> <-- $x is not set.

    #2

    From 12-00 GMT data in session, through $ _SESSION [' a '] =123 have ceased to be transferred;

    I recompiled apache via whm with php 5.1.6. They say problem still persists.

    My /tmp is 2GB in size also

    Using centos 4.3 / cpanel release 10x

    I did not see any errors for the domain in apache nor the domain logs

  2. #2
    Join Date
    Jul 2006
    Posts
    232
    More examples

    http://domain.com/test.php?arg=1 should display "Test = 1" but displays "Test =" because $arg is not being set when the php is being processed.

    http://domain.org/template.php?page=announcements should display domain.org/announcements.php inside the header and footer of domain.org, but $page is not set so the template.php does not know which page to load into the template.

  3. #3
    Join Date
    Jul 2006
    Posts
    232
    I created a test php page with the following code :

    <HTML>
    <BODY>
    <?php echo "Test = " . $arg . "<BR>\n"; ?>
    </BODY>
    </HTML>

    domain.com/test.php?arg=1 produces:

    Test =

  4. #4
    Join Date
    Dec 2001
    Location
    NYC, NY
    Posts
    798
    thats how php should behave

    <?php echo "Test = " . $_GET['arg'] . "<BR>\n"; ?>

    using $arg is a very old php3 practice that leads to big time security problems
    Blog your life away
    http://photoblog.com

  5. #5
    Join Date
    Jul 2006
    Posts
    232
    When a user logs in, the site calls "session_start()" and subsequent pages call "!isset($PHPSESSID)". This worked this morning, now it does not work any longer.

    Seems to be a problem with PHPSESSID as two people complained about this

  6. #6
    Join Date
    Jul 2006
    Posts
    232
    Anyone know about this? Is this an actual server side issue? Fix would be what?

  7. #7
    Join Date
    Mar 2005
    Location
    Athens, Greece
    Posts
    1,528
    It seems to be a problem with register_globals
    Antonis Adamakos @ FuzzFree :: Fully Managed Web Hosting, Development, Online Marketing

  8. #8
    Join Date
    Mar 2004
    Location
    Odessa, Ukraine
    Posts
    605
    register_globals can be changed by user via htaccess or php.ini (depend on php mode).

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •