SitePoint Sponsor

User Tag List

Page 2 of 3 FirstFirst 123 LastLast
Results 26 to 50 of 54
  1. #26
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    OK, just to be clear. You have
    file1.php
    PHP Code:
    <?php
    session_start
    ();
    $_SESSION['value1'] = 'testing';
    echo 
    $_SESSION['value1'];
    ?>
    file2.php
    PHP Code:
    </php
    session_start
    ();
    echo 
    $_SESSION['value1'];
    ?> 
    If you go to file1.php you see "testing" but when you go to file2.php you don't?

    Try changing the files to
    file1.php
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    $_SESSION['value1'] = 'testing';
    echo 
    $_SESSION['value1'];
    ?>
    file2.php
    PHP Code:
    </php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    echo 
    $_SESSION['value1'];
    ?> 
    and see if you get any error messages. If you have cookies disabled, try it with them enabled.

  2. #27
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Showing following in page2

    Code:
    Notice: Undefined index: value1 in.....

  3. #28
    SitePoint Member
    Join Date
    Apr 2010
    Location
    France - Brest
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In page1.php can you add these piece of HTML code and try
    Code:
    <a href="./page2.php">go page2</a>

  4. #29
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    I have already tried this..nothing changes..

  5. #30
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    If you try
    file1.php
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    $_SESSION['value1'] = 'testing';
    echo 
    '<pre>';
    var_dump($_SESSION);
    echo 
    '</pre'>;
    ?>
    file2.php
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    echo 
    '<pre>';
    var_dump($_SESSION);
    echo 
    '</pre'>;
    ?>
    Is value1 there with a different value or not there at all?

    If you use a different browser, same thing?

  6. #31
    SitePoint Zealot cools_sonu's Avatar
    Join Date
    Jan 2010
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by achintya
    session.save_path /var/www/vhosts/mydomain.com/httpdocs/tmp/ /var/lib/php/session
    ...

    Well I've noticed one thing, though I dunno anything regarding this.

    But your local value and master value are different for session.save_path.

    While I've checked mine and here Mittineague too have posted his value. And both of them are same.

    Might be it is not able to retrieve session value from the master or local path.

  7. #32
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    value1 is not there at all..When I use a different browser..same thing...Oh I forgot to tell you guys that I browsing this over a secure connection..Thanks.

  8. #33
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    I don't think sessions differ between http and https. And I don't know which takes precedence, Local or Master. But it seems that there's a good chance that

    session.save_path
    Local value: /var/www/vhosts/mydomain.com/httpdocs/tmp/
    Master value: /var/lib/php/session

    could be the reason for this mysterious behavior.

    I don't know if one's better than the other, but I'm guessing they should be the same.

  9. #34
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    The problem was there before I changed the session.save_path
    Local value to the above value..Thanks

  10. #35
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Anyone has any other idea? Thanks again.

  11. #36
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Please answer these:
    Quote Originally Posted by Mittineague View Post
    If you try
    file1.php
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    $_SESSION['value1'] = 'testing';
    echo 
    '<pre>';
    var_dump($_SESSION);
    echo 
    '</pre'>;
    ?>
    file2.php
    PHP Code:
    <?php
    error_reporting
    (E_ALL);
    ini_set('display_errors'true);
    session_start();
    echo 
    '<pre>';
    var_dump($_SESSION);
    echo 
    '</pre'>;
    ?>
    Is value1 there with a different value or not there at all?

    If you use a different browser, same thing?

  12. #37
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    value1 is not there at all..When I use a different browser..same thing...Thanks Mittineague.

  13. #38
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Thanks for checking. That makes it less likely that it's a browser issue.

    I'm sorry I can't do more than throw trouble-shooting ideas at you, but maybe if you changed your config to

    Code:
    session.use_trans_sid 		1 	1
    it would work? The SESSION would show in the address bar, so it's probably not something you will want to keep, but it should help narrow things down a bit more.

    EDIT: Did the var_dump show PHPSESSID at least?

  14. #39
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    No it doesn't show PHPSESSID. Do I need to change the session.use_trans_sid value? Thanks.

  15. #40
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    It's getting late here where I am (on towards 3AM), but if no one comes up with a solution by tomorrow I'll study into it some more and post back.

    Meanwhile, please try the use_trans_sid 1 1 - restart, and see if that makes a difference.

  16. #41
    SitePoint Zealot cools_sonu's Avatar
    Join Date
    Jan 2010
    Posts
    136
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Achintya,

    From when you are getting the error ?

    As u seems to be using php for web developing not less that 2 year. So you must have done some thing before too.

    Hence I want to know what changes you have done with the settings of your webserver or php ini file or anything related before starting this project or with this project.

    As we can see you have changed the local and master values of save session path.

    So let us know the details, if any available.

  17. #42
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Besides thinking of what changed between working <-> not working,
    Did setting use_trans_id to 1 (true) and restarting the server make any difference?

    Try running this file and post back what you get
    Code PHP:
    <?php
    $f_module_name = session_module_name();
    $i_auto_start = ini_get('session.auto_start');
    $i_use_cookies = ini_get('session.use_cookies');
    $i_use_only_cookies = ini_get('session.use_only_cookies');
    $i_cookie_path = ini_get('session.cookie_path');
    $f_cookie_params = session_get_cookie_params();
    $i_referer_check = ini_get('session.referer_check');
    $i_save_handler = ini_get('session.save_handler');
    $i_save_path = ini_get('session.save_path');
    $f_save_path = session_save_path();
    $i_use_trans_id = ini_get('session.use_trans_id');
    echo '<pre>';
    echo 'f_module_name: ';
    var_dump($f_module_name);
    echo 'i_auto_start: ';
    var_dump($i_auto_start);
    echo 'i_use_cookies: ';
    var_dump($i_use_cookies);
    echo 'i_use_only_cookies: ';
    var_dump($i_use_only_cookies);
    echo 'i_cookie_path: ';
    var_dump($i_cookie_path);
    echo 'f_cookie_params: ';
    var_dump($f_cookie_params);
    echo 'i_referer_check: ';
    var_dump($i_referer_check);
    echo 'i_save_handler: ';
    var_dump($i_save_handler);
    echo 'i_save_path: ';
    var_dump($i_save_path);
    echo 'f_save_path: ';
    var_dump($f_save_path);
    echo 'i_use_trans_id: ';
    var_dump($i_use_trans_id);
    echo '</pre>';
    ?>

  18. #43
    SitePoint Member
    Join Date
    Apr 2010
    Location
    France - Brest
    Posts
    18
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    hum, are you sure it's not a rights protection problem ?

    have you try this issue : http://bytes.com/topic/iis/answers/7...ot-working-iis

  19. #44
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by LrtL View Post
    hum, are you sure it's not a rights protection problem ?

    have you try this issue : http://bytes.com/topic/iis/answers/7...ot-working-iis
    Thanks for your reply LrtL... But my problem is not in Windows as my testing server and production server..both are linux.

  20. #45
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Mittineague View Post
    Besides thinking of what changed between working <-> not working,
    Did setting use_trans_id to 1 (true) and restarting the server make any difference?

    Try running this file and post back what you get
    Code PHP:
    <?php
    $f_module_name = session_module_name();
    $i_auto_start = ini_get('session.auto_start');
    $i_use_cookies = ini_get('session.use_cookies');
    $i_use_only_cookies = ini_get('session.use_only_cookies');
    $i_cookie_path = ini_get('session.cookie_path');
    $f_cookie_params = session_get_cookie_params();
    $i_referer_check = ini_get('session.referer_check');
    $i_save_handler = ini_get('session.save_handler');
    $i_save_path = ini_get('session.save_path');
    $f_save_path = session_save_path();
    $i_use_trans_id = ini_get('session.use_trans_id');
    echo '<pre>';
    echo 'f_module_name: ';
    var_dump($f_module_name);
    echo 'i_auto_start: ';
    var_dump($i_auto_start);
    echo 'i_use_cookies: ';
    var_dump($i_use_cookies);
    echo 'i_use_only_cookies: ';
    var_dump($i_use_only_cookies);
    echo 'i_cookie_path: ';
    var_dump($i_cookie_path);
    echo 'f_cookie_params: ';
    var_dump($f_cookie_params);
    echo 'i_referer_check: ';
    var_dump($i_referer_check);
    echo 'i_save_handler: ';
    var_dump($i_save_handler);
    echo 'i_save_path: ';
    var_dump($i_save_path);
    echo 'f_save_path: ';
    var_dump($f_save_path);
    echo 'i_use_trans_id: ';
    var_dump($i_use_trans_id);
    echo '</pre>';
    ?>
    This is what I get:

    f_module_name: string(5) "files"
    i_auto_start: string(1) "0"
    i_use_cookies: string(1) "1"
    i_use_only_cookies: string(1) "0"
    i_cookie_path: string(1) "/"
    f_cookie_params: array(5) {
    ["lifetime"]=>
    int(0)
    ["path"]=>
    string(1) "/"
    ["domain"]=>
    string(0) ""
    ["secure"]=>
    bool(false)
    ["httponly"]=>
    bool(false)
    }
    i_referer_check: string(0) ""
    i_save_handler: string(5) "files"
    i_save_path: string(46) "/var/www/vhosts/payrolltrack.com/httpdocs/tmp/"
    f_save_path: string(46) "/var/www/vhosts/payrolltrack.com/httpdocs/tmp/"
    i_use_trans_id: string(0) ""

  21. #46
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    The only thing I can see that looks suspicious is the

    "/var/www/vhosts/payrolltrack.com/httpdocs/tmp/"

    Is that an actual physical (not virtual) path?

    Even if it is, it might be too "deep".

    Try making a tmp directory under var and changing it to that.

    And if that doesn't work, please try the

    use_trans_id 1

  22. #47
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Yes that is an actual physical path..Ok let me try what you said..

  23. #48
    SitePoint Evangelist achintya's Avatar
    Join Date
    Apr 2005
    Location
    Chandannagar(India)
    Posts
    459
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Anyone has any other idea? Thanks.

  24. #49
    SitePoint Member
    Join Date
    Apr 2010
    Posts
    4
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    try to use on the first line:

    ini_set("url_rewriter.tags","");

  25. #50
    Programming Team silver trophybronze trophy
    Mittineague's Avatar
    Join Date
    Jul 2005
    Location
    West Springfield, Massachusetts
    Posts
    17,189
    Mentioned
    191 Post(s)
    Tagged
    2 Thread(s)
    Quote Originally Posted by achintya View Post
    Anyone has any other idea? Thanks.
    When you created a shallower temp folder what did you use for the path?
    When you tried use_trans_id 1 - restart server - did you see anything in the browser address bar?


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
  •