« Previous Next »

Thread: PHP Session issues

Last post 06-14-2008 5:06 PM by robbieg. 14 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (15 items)

Sort Posts:

  • 06-10-2008, 4:39 PM

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    PHP Session issues

    hey all,

     

    currently running PHP 5.2.6 under wndows 2003 IIS6. My php session directory is c:\php\sessions.

     

    I see that the php session files are being created, and at times some data is being put into the file, and at times it's not.  But reguardless...  if any data is in the file or not..  php does not look at that files to read in.  In other words..  My php install is unable to retrieve sessions.

     

  • 06-11-2008, 10:26 AM In reply to

    Re: PHP Session issues

    A lot of PHP apps use DB based session data. What session related issues are you getting?

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-11-2008, 10:34 AM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

     Hello,

     

    Currently all session information is set to store in files.

     

    no data is being written to the php session files.

    Php is not able to read any session data. 

  • 06-11-2008, 11:18 AM In reply to

    Re: PHP Session issues

    What PHP applications are you using, or are you using custom code?

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-11-2008, 11:32 AM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

    yes Im using custome code.

     

    and my forums are also down..  which is not custom code.

     

    the forums saying sessions are timed out, and when i try and logout..  it give me an error of  " Session verification failed"  and that is done by simple machines forum.

  • 06-11-2008, 1:20 PM In reply to

    Re: PHP Session issues

     Ok, what NTFS permissions have you assigned to your sessions directory for your IUSR account (or whatever account you are using for IIS)?

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-11-2008, 1:38 PM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

    according to phpinfo()

     

    session.save_path = C:\php\session

    session.cookie_path = C:\php\session

     

    NTFS permissions on C:\php\session are as follows.

     HC7Group (group name of all IIS users) read + ex, list, read, write.
    Administrators = full control
    IIS guest = read + ex, list, read, write.
    Network service= read + ex, list, read, write.
    system = full control.

    default iis user is  IUSR_TEMPLATE

  • 06-11-2008, 7:32 PM In reply to

    Re: PHP Session issues

     Have you tried granting the modify permission?

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-11-2008, 8:10 PM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

    I have just issued that permission and still has no effect.

     

  • 06-11-2008, 8:49 PM In reply to

    Re: PHP Session issues

    Ok, I'd recommend using Filemon to monitor your sessions directory and then try and start using your PHP apps as per usual. I'd almost bet it will be a permission problem, and filemon should help flush it out for you.

    ----------------
    Dominic Ryan
    Microsoft IIS MVP
    www.iis-aid.com
    My IIS articles
    My PHP articles
    My How-to guides
  • 06-12-2008, 5:25 AM In reply to

    • lat00uk
    • Not Ranked
    • Joined on 06-12-2008, 9:19 AM
    • Posts 1

    Re: PHP Session issues

    Hi I think Im having the same issue, as I have just mig'ed a bunch of websites from a Linux Redhat 8 box running php 4.2.2 to a 2003 box running IIS and php 5.2.4.

    On one of the website there is a login box and when you login it just takes you back to the front page, the web developer mentioned that it was something to do with the session.auto_start setting in php and I have looked at the php.ini on both servers and both of them are the same, so I googled and found myself here.

    I have also done the NTFS permissions on the session directory to see if it uses it and it creates the file. I just logged in to the website and it created sess_g411ish4mqbaqbq9pqtmddipe6 file with MM_Username|N;MM_UserGroup|N; inside of it.....

    Is that right? 

  • 06-12-2008, 8:50 AM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

     your a bit better off then i am.

     

    Your session files get data put into them...  where mine do not.  

    Last night i reinstalled PHP and now my forum works as it should..  but not the simple php code.

    I will be trying the diskmon later today.

     

  • 06-12-2008, 3:44 PM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

     i have solved my issue by reinstalled PHP.

     

    I have no idea what went wrong, but a manual install (not using the windows installer) has fixed this issue for me. 

  • 06-14-2008, 5:02 PM In reply to

    Re: PHP Session issues

    I'm with brashquido on this....sounds like a permissions problem.

    You need to see who the user is who php (as fastcgi) is running under and make sure that users has full perms.

     

  • 06-14-2008, 5:06 PM In reply to

    • robbieg
    • Not Ranked
    • Joined on 04-30-2008, 1:44 PM
    • Posts 10

    Re: PHP Session issues

    CrazyMerlin....

     

    did u need a higher posting count?  

     

    This issue is solved by a reinstall.   Sorry that I did not mark as much. 

Page 1 of 1 (15 items)
Microsoft Communities