Undefined property: CI_Loader::$session |
A PHP Error was encountered
Severity: Notice Message: Undefined property: CI_Loader::$session Filename: views/add_newsletter.php Line Number: 75 views/add_newsletter.php PHP Code: <form action="<?php echo base_url();?>cpages/send" class="validate" method="POST" class="form bg-clouds padding-top20 padding-bottom20 validate"> Line 74 - 75: <div class="clearfix"></div> How to fix this error: Undefined property: CI_Loader::$session ?
" If I looks more intelligence please increase my reputation."
Why don't you take the time to learn PHP and quit asking the same question over and over?
What did you Try? What did you Get? What did you Expect?
Joined CodeIgniter Community 2009. ( Skype: insitfx )
I think this is more than php it's CI that's I am still learning. I am still learning it for 5 months. Still new. That's why I think why I need this forum.
" If I looks more intelligence please increase my reputation."
I already add this to the constructor: $this->load->library('session');
and now I am having this error: -------------------------------------- A PHP Error was encountered Severity: Warning Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php Line Number: 117 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php Line: 34 Function: library File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php Line: 315 Function: require_once An uncaught Exception was encountered Type: Exception Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created. Filename: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\system\libraries\Session\drivers\Session_files_driver.php Line Number: 119 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php Line: 34 Function: library File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php Line: 315 Function: require_once -------------------------------------------- How to fix the errors? Line 116 - 117: $paths = $CI->load->get_package_paths(TRUE); Line 119: $class_name = $prefix.$child_name;
" If I looks more intelligence please increase my reputation."
It sounds like you haven't configured your sessions storage location properly.
How to configure sessions storage location properly?
I am looking for where to start but do not know how to? From which file? And how?
" If I looks more intelligence please increase my reputation."
(05-28-2016, 07:21 AM)davy_yg Wrote: How to configure sessions storage location properly? Inside 'config' folder, files path is application/config/config.php. Using your editor find 'Session Variables' and you will see the configuration field for session. Read the comment for more guide. $config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = APPPATH.'storage'; // im create folder called 'storage' inside 'application' folder. $config['sess_match_ip'] = FALSE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE;
Keep calm.
@davy_yg
What you are doing is not learning. You just need to get the job done. This approach prevents you to remember things, to get experienced. You claim that you are learning CodeIgniter for 5 months. This is a lot of time, but you don't show progress in dealing with CI. If you face a problem, first try to break it alone, even it would slow down your concrete goal. Try to seek information alone, I assure you, there is information in Internet for every possible problem that you might face. Try to be autonomous as much as you can, then you will make real progress. No bad feelings, Ivan.
Hello,
I have been trying to figure this things out through google and have not find the answer. I still having this same errors even after configuring this: config/config.php PHP Code: $config['sess_driver'] = 'files'; A PHP Error was encountered Severity: Warning Message: mkdir(): Invalid path Filename: drivers/Session_files_driver.php Line Number: 117 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php Line: 34 Function: library File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.phpLine: 315 Function: require_once An uncaught Exception was encountered Type: Exception Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created. Filename: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\system\libraries\Session\drivers\Session_files_driver.php Line Number: 119 Backtrace: File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\application\controllers\cpages.php Line: 34 Function: library File: C:\Program Files (x86)\EasyPHP-Devserver-16.1\eds-www\CompanyProfileCI\index.php Line: 315 Function: require_once ---------------------------------- How to fix the error? (I've known php for 3 years - CI for 5 months only)
" If I looks more intelligence please increase my reputation."
|
Welcome Guest, Not a member yet? Register Sign In |