The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Problems with sessions

Discussion in 'General Discussion' started by absolut, Dec 2, 2007.

  1. absolut

    absolut Member

    Joined:
    Jul 29, 2003
    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Porto - Portugal
    Hello,

    I'm having some problems configuring my server sessions in php.

    Server espec:

    WHM 11.2.0 cPanel 11.11.0-S18033
    CENTOS Enterprise 4.5 i686 on standard - WHM X v3.1.0
    PHP version 5.2.4
    MySQL version 4.1.22-standard
    Apache version 1.3.39 (Unix)

    Sessions def. in php.ini:
    Code:
    [Session]
    session.save_handler = "files"
    session.save_path = "/tmp/sessions"
                                        ; in the case of files, this is the
                                        ; path where data files are stored
    session.use_cookies = 1
    session.name = "PHPSESSID"
                                        ; name of the session
                                        ; is used as cookie name
    session.auto_start = 0
    session.cookie_lifetime = 0
                                        ; or if 0, until browser is restarted
    session.cookie_path = "/       "
    session.cookie_domain =
    session.serialize_handler = "php     "
                                        ; php is the standard serializer of PHP
    session.gc_probability = 1
                                        ; 'garbage collection' process is started
                                        ; on every session initialization
    session.gc_maxlifetime = 1440
                                        ; data will be seen as 'garbage' and
                                        ; cleaned up by the gc process
    session.referer_check =
                                        ; externally stored URLs containing ids
    session.entropy_length = 0
    session.entropy_file =
    ; session.entropy_length    = 16
    ; session.entropy_file      = /dev/urandom
    session.cache_limiter = "nocache "
                                        ; determine HTTP caching aspects
    session.cache_expire = 180
    session.use_trans_sid = 1
                                        ; by compiling with --enable-trans-sid
    Register globals are ON

    First I recieved about 7 e-mails from clients saying that in joomla pre instllation teste sessions.save_path was unwritable.
    I went to /temp created a sessions folder and chmoded it to 777

    After that they still can't login on the admin area
    Error: Warning: session_start() [function.session-start]: Cannot find save handler files in /home/asasdosa/public_html/site00/administrator/index.php on line 111

    From what I could read on-line in joomla this means that clients can't save sessions file in the session.save_path although it is writable. But never saw a solution for it, because it was all client oriented. All the solutions were contact your isp.

    Well they did contact, but the isp doesn't know how to fix it :)

    Could you please help?

    Thank you,
    absolut
     
  2. swapneel

    swapneel Member

    Joined:
    Oct 2, 2006
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    You have the session.save.path set as,

    session.save_path = "/tmp/sessions"

    which means all the PHP session files would go into /tmp/sessions directory.

    Ideally one has session.save.path is set as /tmp which is writable to all and has the sticky bit set.

    You can either set this to /tmp only in php.ini or make sure that /tmp/sessions is writable to all and has the sticky bit set so that only the user which owns the file will be able to delete it.
     
  3. joaoarosoa

    joaoarosoa Registered

    Joined:
    Dec 1, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I chmoded it to 777 so I supose it's writable to all. Problem is most scripts take /tmp/sessions as default so I really need to use that folder. But I have chmoded it to 777 so aparently it would work.

    Any idea?

    thanks,
    João
     
  4. joaoarosoa

    joaoarosoa Registered

    Joined:
    Dec 1, 2007
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    For anyone who will eventually face the same problem that's what I did:

    In my server I have php 4 running as secundary, and then i added this line:

    to .htaccess

    In php4 it runs with no problem. From what I can see itis a problem from joomla with php5.

    Correct me if I'm wrong, anyway with me it worked.

    Thaks,
    João
     
Loading...

Share This Page