bella 发表于 2016-6-13 14:19:42

mkdir(): Invalid path

在本地可以运行,在线上就不能运行了。求助大神
A PHP Error was encountered

Severity: Warning

Message: mkdir(): Invalid path

Filename: drivers/Session_files_driver.php

Line Number: 117

Backtrace:

File: /home/tanyetao/domains/tanyetao.com/public_html/application/controllers/Admin.php
Line: 8
Function: library

File: /home/tanyetao/domains/tanyetao.com/public_html/index.php
Line: 315
Function: require_once
An uncaught Exception was encountered

Type: Exception

Message: Session: Configured save path '' is not a directory, doesn't exist or cannot be created.

Filename: /home/tanyetao/domains/tanyetao.com/public_html/system/libraries/Session/drivers/Session_files_driver.php

Line Number: 119

Backtrace:

File: /home/tanyetao/domains/tanyetao.com/public_html/application/controllers/Admin.php
Line: 8
Function: library

File: /home/tanyetao/domains/tanyetao.com/public_html/index.php
Line: 315
Function: require_once
A PHP Error was encountered

Severity: Warning

Message: file_exists(): open_basedir restriction in effect. File(ee9f8b3e2b0a745b03aa0f8d7799a739b0261493) is not within the allowed path(s): (/home/tanyetao/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php55/lib/php/:/usr/local/php55/lib/php/)

Filename: drivers/Session_files_driver.php

Line Number: 154

Backtrace:
A PHP Error was encountered

Severity: Warning

Message: fopen(): open_basedir restriction in effect. File(ee9f8b3e2b0a745b03aa0f8d7799a739b0261493) is not within the allowed path(s): (/home/tanyetao/:/tmp:/var/tmp:/usr/local/lib/php/:/usr/local/php55/lib/php/:/usr/local/php55/lib/php/)

Filename: drivers/Session_files_driver.php

Line Number: 156

Backtrace:
A PHP Error was encountered

Severity: Warning

Message: fopen(ee9f8b3e2b0a745b03aa0f8d7799a739b0261493): failed to open stream: Operation not permitted

Filename: drivers/Session_files_driver.php

Line Number: 156

Backtrace:
A PHP Error was encountered

Severity: Warning

Message: Unknown: Failed to write session data (user). Please verify that the current setting of session.save_path is correct ()

Filename: Unknown

Line Number: 0

Backtrace:

Closer 发表于 2016-6-13 14:37:24

$config['sess_save_path'] = NULL;
或指向你要的目錄 (該目錄需有權限建立資料夾)

bella 发表于 2016-6-14 15:25:25

Closer 发表于 2016-6-13 14:37
$config['sess_save_path'] = NULL;
或指向你要的目錄 (該目錄需有權限建立資料夾)

什么才知道有没有权限呢,因为我指定了一个目录,还是报错。
An uncaught Exception was encountered

Type: Exception

Message: Session: Configured save path 'https://www.tanyetao.com/tanyetao/sessions' is not a directory, doesn't exist or cannot be created.

Filename: /home/tanyetao/domains/tanyetao.com/public_html/tanyetao/system/libraries/Session/drivers/Session_files_driver.php

Line Number: 119

Backtrace:

File: /home/tanyetao/domains/tanyetao.com/public_html/tanyetao/application/controllers/Admin.php
Line: 8
Function: library

File: /home/tanyetao/domains/tanyetao.com/public_html/tanyetao/index.php
Line: 315
Function: require_once

1023102176 发表于 2017-5-12 17:59:42

https://my.oschina.net/rain21/blog/505771看我的回答
页: [1]
查看完整版本: mkdir(): Invalid path