SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot praveen's Avatar
    Join Date
    Apr 2001
    Location
    Bahrain
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Help! Php Session Problem

    Hello Friends,

    I had tested some pages registering some session variables all is working fine but some times so rarely it shows an error like this

    Warning: purged 6 expired session objects in c:\apache\htdocs\test\test.php on line 3

    What is this and how this is happening? Please Help.

    Thanks In Advance

  2. #2
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Take a look at this thread at phpbuilder:
    http://www.phpbuilder.com/forum/read...&thread=108354

    Also,
    The error message is coming from session.c (excerpt):
    Code:
    	if (PS(mod_data) && PS(gc_probability) > 0) {
    		int nrdels = -1;
    
    		nrand = (int) (100.0*php_combined_lcg(TSRMLS_C));
    		if (nrand < PS(gc_probability)) {
    			PS(mod)->gc(&PS(mod_data), PS(gc_maxlifetime), &nrdels);
    #if 0
    			if (nrdels != -1)
    				php_error(E_NOTICE, "purged %d expired session objects\n", nrdels);
    #endif
    		}
    	}
    note "E_NOTICE" this means that you have notice reporting on; see:
    http://www.php.net/manual/en/phpdeve...ernal.e-notice

    "Notices are not printed by default, and indicate that the script encountered something that could indicate an error, but could also happen in the normal course of running a script. For example, trying to access the value of a variable which has not been set, or calling stat() on a file that doesn't exist."
    S

  3. #3
    SitePoint Zealot praveen's Avatar
    Join Date
    Apr 2001
    Location
    Bahrain
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks a lot for that.

    Hi scoates,

    Thanks a lot for that reply. I had configured my php.ini file for E-All. So is that error message because of this?. Will this purge problem affect user session.

  4. #4
    purple monkey dishwasher scoates's Avatar
    Join Date
    Nov 2001
    Location
    Montreal
    Posts
    794
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    the purge problem won't affect sessions; it'll just display the message you're getting whenever sessions are purged (purging sessions is normal behaviour for PHP).

    It sounds to me like the php.ini setting is, in fact, the cause of this notice being shown, so changing it back to the default will suppress these "warnings".

    S

  5. #5
    SitePoint Zealot praveen's Avatar
    Join Date
    Apr 2001
    Location
    Bahrain
    Posts
    108
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Thanks

    Thanks a lot for your fast reply. So i will make that back to initial setting.
    praveen


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
  •