• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Autoloading Session Library causes Abort Page request

#1
Hi,

My website is using the latest version of CodeIgniter 3.0.2:

http://petpalaceadoptables.com/

But for some reason, it always aborts the request. I have Session autoloaded in the autoload.php config file. When I remove this library, it works fine. But for some reason, the session library isn't working. I haven't made any changes to the session config values.

I created a test file using session_start(); and other session functions and storing data in sessions like $_SESSION['test'] = 1234; and it all works fine.

I'm not sure what the problem is exactly. There's no error messages in the log files when I turn logging on either.

This is a clean install, no code modifications apart from the base_url in the config.php file and autoloading the session library.

Any suggestions for debugging/figuring out what could be causing the issue?
Reply

#2
Hi

session_start() is a native php sessions command which of course you are free to use, along with any other php functions of course.

CI offers its own sessions library which is VERY easy to use, but I would suggest you read the docs first.

http://www.codeigniter.com/user_guide/li...sions.html

It is very powerful, and when you get the hang of it (which does not take very long), just about does everything you will need in most circumstances, and is far easier than using native php sessions (IMHO).

Something I love about CI, among a few things I could list, is that the documentation is very user friendly, concise and clear. I hope that will help you in some way,

Best wishes,

Paul.
Reply

#3
As you said... "you didn't make any changes to the session config values". You must set the $config['sess_save_path'], which by default is NULL... but shouldn't be.
Reply

#4
(10-27-2015, 07:13 AM)Avenirer Wrote: As you said... "you didn't make any changes to the session config values". You must set the $config['sess_save_path'], which by default is NULL... but shouldn't be.

I didn't make any changes to this value on another host, and it worked fine.

I've also tried changing it to a directory, like:

APPPATH . "ci_sessions/";

and it doesn't work. I have CHmod'd the folder too.
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


Users browsing this thread:
1 Guest(s)


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2019 MyBB Group.