"Unable to locate the specified class: Session.php"... |
Hi Guys,
After some years developing with CI i'm here to write about an issue i experiencing with v3.1.4 Starting with my code: application/core PHP Code: class FF_Controller extends CI_Controller PHP Code: abstract class FF_Model extends CI_Model application/controllers PHP Code: class Login extends FF_Controller application/config/autoload.php PHP Code: <?php application/models PHP Code: class User_model extends FF_Model Removing the autoload "session" entry all working. Looking in System/libraries seems that session.php does not exists. Nevertheless, that file seems to be in the Session subdirectory (system/libraries/session/). But load_class(...) is not looking inside that folder: PHP Code: // Look for the class first in the local application/libraries folder How can i set to work properly my session library? PS: loading it manually from the controller method does not change the result. I still get the error. Logs are pretty clean. Only debug infos not related to sessions.
A file in the Core could be incomplete and or corrupted. Download a fresh CodeIgniter package and overwrite the system directory with the freshly downloaded one.
EDIT Are you using PHP Code: load_class("Session/Session", "core") for session loading or are you loading via PHP Code: $this->load->library("session")
(06-13-2017, 11:50 PM)Martin7483 Wrote: A file in the Core could be incomplete and or corrupted. Download a fresh CodeIgniter package and overwrite the system directory with the freshly downloaded one. Done yesterday, while i'm getting crazy with this problem. My "system" forlder is a fresh downloaded version (CI 3.1.4). No such way to get the correct loading of the sessions.... About my loading: Absolutely i'm not calling load_class. Also, the loading of Session is not by the loader class in the controller. I use CI autoload (autoload.php) PHP Code: $autoload['libraries'] = array('session'); If i remove this, and i load session by "$this->load->library("session")" no change. Still getting the issue.
Setup a clean install of CodeIgniter and autoload the session library.
I have multiple CI 3.x versions and none of them have this issue.
It is not clear to me exactly what problem you are having.
The loader class will find Session.php even though it is in a subfolder. You can use PHP Code: var_dump($this->session); If sessions are not functioning properly it might be a config settings problem. What setting do you have for sessions and cookies? |
Welcome Guest, Not a member yet? Register Sign In |