用户
 找回密码
 入住 CI 中国社区
搜索
查看: 6406|回复: 3
收起左侧

[版本 3.x] mkdir(): Invalid path

[复制链接]
发表于 2016-6-13 14:19:42 | 显示全部楼层 |阅读模式
在本地可以运行,在线上就不能运行了。求助大神
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:
发表于 2016-6-13 14:37:24 | 显示全部楼层
$config['sess_save_path'] = NULL;
或指向你要的目錄 (該目錄需有權限建立資料夾)
 楼主| 发表于 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
发表于 2017-5-12 17:59:42 | 显示全部楼层
https://my.oschina.net/rain21/blog/505771  看我的回答

本版积分规则