PHP session created with 000 mod

Discussion in 'Server Operation' started by Cloud, Nov 10, 2007.

  1. Cloud

    Cloud New Member

    Hi all,

    For several days, I get all these with my server that run Debian Etch, MySQL 5.0.32, PHP 5.2.0, Apache 2.2.3
    - All my application using session module give an error "Could not verify session" when try to login through the login page (it was ok before)
    - I checked the session files created when user login and their mod is 000
    - Most of the session file size is 0 (nothing inside)
    - I tried to restart Apache but it doesn't work, system restart can solve the problem but it happens again after a few weeks.

    Have you ever got these kinds of errors before?

    All your ideas/assistant will be much appreciated.

    Thanks in advanced.
  2. Cloud

    Cloud New Member

    One more thing, the unused session files is not deleted automatically
    I've got a very long list of session files even thought they're not used anymore
    That cause some application can't login (for example phpmyadmin :( )
  3. falko

    falko Super Moderator ISPConfig Developer

    Where are the session files stored? Is it /tmp? What's the output of
    ls -la /tmp
  4. Cloud

    Cloud New Member

    I put all the session file in /var/php_session/ (manually created)
    Before it was in /var/lib/php5/session/ (by default) but after got this pb, I tried to change the location

    Here is some result of the following command
    myserver:~# ls -la /var/php_session |more
    total 760
    drwxrwxrwx  2 root     root     405504 2007-11-12 04:37 .
    drwxrwxrwx 19 root     root       4096 2007-11-03 13:29 ..
    -rw-------  1 www-data www-data      0 2007-11-11 13:43 sess_002ea94d046e2e5f043c5b5498a36c20
    -rw-------  1 www-data www-data      0 2007-11-11 09:29 sess_003606475e7e47b18a61774e95db69ec
    -rw-------  1 www-data www-data      0 2007-11-10 16:55 sess_00360a506f026c14cf6bd3b7e9f58077
    -rw-------  1 www-data www-data      0 2007-11-11 17:01 sess_0048c203f90871f501bf4191f80a7534
    As you can see in the result, almost the session created is zero size :confused:

    And this is the error I got with phpmyadmin when trying to access it
    Warning: ini_set() [function.ini-set]: A session is active. You cannot change the session module's ini settings at this time.
    Even restarting the server, it doesn't solve this pb with phpmyadmin :(

    Do you have any idea?
    Last edited: Nov 12, 2007
  5. Cloud

    Cloud New Member

    Hi all,

    The problem was solved, in fact it was wrong of umask in /root/.bashrc


Share This Page