Results 1 to 7 of 7

Thread: New CENTOS setup, cookies not working

  1. #1
    Join Date
    Jan 2010
    Posts
    5

    Default New CENTOS setup, cookies not working

    We were using a CENTOS 5.3 hostinabox setup but had some issues and needed to rebuild our os. We did not see the hostinabox option this time so we just installed CENTOS 4 LAMP.

    After installing Kloxo (Lxadmin), everything is back up and running, but cookies do not seem to be working now.

    Our PHPBB forum seems to operate okay but our AVArcade is not setting cookies and my own PHP scripts are no longer setting cookies.

    Anyone have a clue as to why?

  2. #2
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    Have you noticed any issues with session data being set?

    Simple test - create a page with the following:

    PHP Code:
    <?php

    session_start
    ();

    switch ( 
    $_GET['action'] ) {
      case 
    'set':
        
    $_SESSION['test'] = 'Session data stored';
      break;

      default:
        if ( 
    $_SESSION['test'] ) {
          echo 
    $_SESSION['test'];
        } else {
          echo 
    'No session data stored';
        }
      break;
    }

    echo 
    "\r\n\r\nSESSION dump:\r\n\r\n";

    var_dump($_SESSION);

    ?>
    Visit /page.php?action=set and then /page.php to determine whether session data is being set.

    If the test fails, check your PHP session save path and confirm that PHP has permissions to write to the path.

    If the test succeeds, check your PHP session cookie settings and your local settings (i.e. I've seen FireFox block new cookies from a domain after removing cookies for testing purposes).

  3. #3
    Join Date
    Jan 2010
    Posts
    5

    Default

    I have been using test scripts for several days now trying to figure this out.

    Session cookies are fine. They work.

    The individual cookie is where I am running into problems.

    I can set them fine with JavaScript, but not with PHP.

    My browser is accepting them, but PHP is not setting them.

  4. #4
    Join Date
    Jan 2010
    Posts
    5

    Default

    Also, I reinstalled the AV Arcade script from scratch and it is now working, but my test scripts still do not work.

  5. #5
    Join Date
    Jan 2010
    Posts
    5

    Default

    Never mind. For some reason they work now.

  6. #6
    Join Date
    Dec 2007
    Posts
    1,141

    Default

    To confirm, you cannot set cookies with PHP's setcookie() function from the AV Arcade application or from any test scripts - could you post one of the test scripts for review?

    If you determine the source of the issue, please post back with it (particularly if it is Kloxo-related).

  7. #7
    Join Date
    Jan 2010
    Posts
    5

    Default

    I will let you know, but I am baffled. I changed nothing. Yesterday my online game wouldn't work because I couldn't set cookies with PHP, and today they work as they always have.

    Very strange.

Bookmarks

Posting Permissions

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