Codeigniter not working in IIS

18,030

Solution 1

Here’s a fix that worked for me:

  • Open php.ini
  • Set: session.save_path = C:\inetpub\temp\sessions
  • Create C:\inetpub\temp\sessions and give IUSR and NETWORK SERVICE (or whatever is the identity of app pool) full rights.
  • Save php.ini

This was a good reference: http://forums.iis.net/post/1735092.aspx

Solution 2

give config.php

$config['sess_save_path'] = 'writable absolute path';
Share:
18,030
Admin
Author by

Admin

Updated on June 04, 2022

Comments

  • Admin
    Admin almost 2 years

    Ok, I got an codeigniter app. it works fine in localhost, works fine in a php hosting that I got. But my client wants it running in IIS. I've passed the web.config pitfall but now I get the following error:

    An uncaught Exception was encountered

    Type: Exception

    Message: Session: Configured save path 'c:\windows\temp' is not writable by the PHP process.

    Filename: E:\home\emconexao.com\site3\system\libraries\Session\drivers\Session_files_driver.php

    Line Number: 124

    I know it's a PHP configuration trouble, but where ?

    In my application/config/autoload.php file if I remove session from libraries it works... until I login the site, then obviously it can't generate session and it crashes...

    Can anyone help me?

  • Elijah Lofgren
    Elijah Lofgren over 8 years
    Note that one location of php.ini might be C:\Program Files (x86)\IIS Express\PHP\v5.3\php.ini and that file might still be used even if C:\Program Files (x86)\IIS Express\PHP\v5.4 exists.