session fix

This commit is contained in:
CHIEFSOFT\ameye
2024-11-17 08:39:03 -05:00
parent dd041e3a87
commit 879fc68bb3
6 changed files with 231 additions and 30 deletions
+3 -1
View File
@@ -41,7 +41,7 @@ abstract class BaseController extends Controller
* Be sure to declare properties for any property fetch you initialized.
* The creation of dynamic property is deprecated in PHP 8.2.
*/
// protected $session;
protected $session;
/**
* @return void
@@ -54,12 +54,14 @@ abstract class BaseController extends Controller
// Preload any models, libraries, etc, here.
// E.g.: $this->session = \Config\Services::session();
$this->session = \Config\Services::session();
$httpHost = $_SERVER['HTTP_HOST'];
if ( $httpHost == 'https://promo.wrenchboard.com' || $httpHost == 'promo.wrenchboard.com' ){
$_SERVER['CI_ENV'] = 'production';
$_SERVER['CI_ENVIRONMENT'] = 'production';
}
// if ( session_status() !== PHP_SESSION_ACTIVE ) session_start();
}
public function APIcall($method, $url, $data) {