Welcome Guest, Not a member yet? Register   Sign In
Issue with Session.php on CLI

(This post was last modified: 11-20-2023, 02:55 PM by byrallier.)

Hello everyone,I got stuck on a issue with CI 3 version.
I have external PHP file which help me utilize CI Controller externally. 
I have a loader :
My_loader a simple custom loader to load controller. I got it from here: https://forum.codeigniter.com/showthread...#pid366518

On my ExternalPHP file:
PHP Code:
$CI =& get_instance();
$CI->load->library('session/session');//unintended-added while trying to fix issue
session is loaded by autoloader:
$autoload['libraries'] = array(

But the issue is when I called controller, it simply try to load "session.php" which is not allowed to be added over CLI as its nothing for it. then my controller is not loaded properly by saying:

unable to locate the specified class: Session.php

session is normally loaded by autoload in config.php and works perfectly on web server. But when it comes to loading a controller in an external php file. Its a huge pain. I wanted to patch framework itself to avoid trying to load session over CLI but you know, at some ponit I will have to migrate CI4 and other versions and i dont want to mass the code

also the other weird part is, when I remove loading controller part, it doesnt throw the error.
any advice?

Is there any error log?maybe You could paste it here so we can take a look
Layanan hosting terbaik Indonesia dan aplikasi ujian online

(This post was last modified: 11-21-2023, 06:30 AM by byrallier.)

program stop running when I tried to load controller with following error:

"unable to locate the specified class: Session.php"
I debug whole code,its identified perfectly, file exists but its not load as it called over CLI

Theme © iAndrew 2016 - Forum software by © MyBB