消息。Session: 配置的保存路径'C:/\Windows/Temp'不能被PHP进程写入。

问题描述 投票:0回答:1

Codeigniter HMVC应用程序在Linux主机和xampp本地服务器上运行良好,但在Plesk Windows主机上上传后,它扔了错误。我已经尝试了一切来解决它,但仍然得到了同样的错误。

An uncaught Exception was encountered
Type: Exception

Message: Session: Configured save path 'C:\Windows\Temp' is not writable by the PHP process.

Filename: G:\PleskVhosts\rkingmart.com\httpdocs\system\libraries\Session\drivers\Session_files_driver.php

Line Number: 143

Backtrace:

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Loader.php
Line: 173
Function: _ci_load_library

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Loader.php
Line: 190
Function: library

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Loader.php
Line: 153
Function: libraries

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Loader.php
Line: 65
Function: initialize

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Base.php
Line: 55
Function: __construct

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Base.php
Line: 60
Function: __construct

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Controller.php
Line: 4
Function: require

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\third_party\MX\Modules.php
Line: 123
Function: include_once

File: G:\PleskVhosts\rkingmart.com\httpdocs\application\core\MY_Controller.php
Line: 3
Function: spl_autoload_call

File: G:\PleskVhosts\rkingmart.com\httpdocs\index.php
Line: 292
Function: require_once

我怎么能解决这个问题?

php codeigniter plesk hmvc
1个回答
0
投票

最后,我有了一个解决方案。我刚刚更换了会话配置

application/config/config.php

$config['sess_driver'] = 'files';
$config['sess_cookie_name'] = 'ci_session';
$config['sess_expiration'] = 7200;
$config['sess_save_path'] = NULL;
$config['sess_match_ip'] = FALSE;
$config['sess_time_to_update'] = 300;
$config['sess_regenerate_destroy'] = FALSE;

$config['sess_driver']             = 'files';
$config['sess_cookie_name']        = 'pcfx_session_';
$config['sess_expiration']         = 7200;
$config['sess_save_path']          = APPPATH.'writable';
$config['sess_match_ip']           = FALSE;
$config['sess_time_to_update']     = 300;
$config['sess_regenerate_destroy'] = FALSE; 
© www.soinside.com 2019 - 2024. All rights reserved.