When you open the localhost localhost project, they work correctly and open on the server, and then the wrong path
PHP error occurredSeverity Level: WarningMessage: mkdir (): Invalid pathFile Name: drivers / Session_files_driver.phpLine Number: 117Backtrace:File: /Library/Server/Web/Data/Sites/garden_worx/index.php Line: 292 Function: require_once
PHP error occurred
Severity Level: Warning
Message: mkdir (): Invalid path
File Name: drivers / Session_files_driver.php
Line Number: 117
Backtrace:
File: /Library/Server/Web/Data/Sites/garden_worx/index.php Line: 292 Function: require_once
Error 2
An unrelated exception was foundType: ExceptionMessage: session: configured save path '' is not a directory, does not exist or cannot be created.File Name: / Library / Server / Web / Data / Sites / garden _worx / system / libraries / Session / drivers / Session_files_driver.phpLine Number: 119Backtrace:File: /Library/Server/Web/Data/Sites/garden_worx/index.php Line: 292 Function: require_once
An unrelated exception was found
Type: Exception
Message: session: configured save path '' is not a directory, does not exist or cannot be created.
File Name: / Library / Server / Web / Data / Sites / garden _worx / system / libraries / Session / drivers / Session_files_driver.php
Line Number: 119
Error 3
PHP error occurredSeverity Level: Warning: fopen (6d898f163e36616cef220426dad109225a66f74a): :: drivers/Session_files_driver.php: 156Backtrace:
: fopen (6d898f163e36616cef220426dad109225a66f74a): :
: drivers/Session_files_driver.php
: 156
codeigniter 3 , , , chmod 700
.
$config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 1440; $config['sess_save_path'] = FCPATH . 'application/cache/sessions/'; $config['sess_match_ip'] = TRUE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = TRUE;
> config >
$autoload['libraries'] = array('session');
. , , , _ Welcome.php class Welcome extends CI_Controller {}.
Welcome.php
class Welcome extends CI_Controller {}
Codeigniter doc 2 3 http://www.codeigniter.com/docs
Codeigniter 3 http://www.codeigniter.com/user_guide/libraries/sessions.html
Codeigniter 2: http://www.codeigniter.com/userguide2/libraries/sessions.html
config.php
$config['encryption_key'] = 'pXeQY2733rR560MrwJy40OL4WaSGmr5A';
http://randomkeygen.com/
, :)
$config['sess_save_path'] = sys_get_temp_dir();
?
, application -> config -> config.php
application -> config -> config.php
$config['sess_save_path'] = NULL;
$config['sess_save_path'] = FCPATH.'ci_sessions';
. , ...
$config['sess_driver'] = 'files'; $config['sess_cookie_name'] = 'ci_session'; $config['sess_expiration'] = 7200; $config['sess_save_path'] = sys_get_temp_dir(); $config['sess_match_ip'] = TRUE; $config['sess_time_to_update'] = 300; $config['sess_regenerate_destroy'] = FALSE;
output_buffering = On
php.ini
adding 'session' to autoload.php file solved my problem
$ autoload ['library'] = array ('form_validation', 'session');
This work is for me.
Source: https://habr.com/ru/post/1620031/More articles:How can I manage Go dependencies when checking a vendor directory in version control? - gitSetting the width of the viewport when the container is less than the width of the device - androidPaxos 2a message loss - algorithmhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1620029/mathematical-functions-to-calculate-possibilities&usg=ALkJrhhUiPmdCOCRQGYJve0UBrZqb_-M8wFind the first time a value occurs in a data frame - pythonLarge distance matrix in clustering - matrixHow to handle __clone for object properties of a child class - phpCalculation of distances on large vectors [productivity] - rHow to name the firebase / php-jwt class in Laravel 5 - phpHow to get mimeType from Cordova file transfer module? - javascriptAll Articles