ci框架中遇见的一些错误和解决方法笔记

ps:根据经验不断修改和更新,欢迎指出错误~

1、an uncaught exception was encountered
type: exception

message: session: configured save path ‘/usr/share/nginx/html/terminal_php/application/../sesssion_files’ is not writable by the php process.

filename: /usr/share/nginx/html/terminal_php/system/libraries/session/drivers/session_files_driver.php

a php error was encountered

severity: warning

message: fopen(1f194f2bef7c1013a926c931c860a0eb62071b84): failed to open stream: permission denied

filename: drivers/session_files_driver.php

原因: 访问session_files_driver.php该文件的权限不够,因为sesssion_files该文件夹内是储存session的文件,然而每次用户访问都会进行动态生成session的写入、读取和执行,因此,只要设置好“读、写、执行”权限即可。解决办法:提高权限(chmod 777)2、 warning: mkdir(): permission denied in /usr/share/nginx/html/terminal_php/system/core/log.php on line 122

a php error was encountered

severity: warning

message: mkdir(): permission denied

filename: core/log.php

line number: 122

backtrace:

file: /usr/share/nginx/html/terminal_php/index.php

line: 293

function: require_once

原因:由于服务器(nginx或者apache或者其他服务器)账户没有权限创建文件,因为必须把修改网站根目录的权限解决办法:提高服务器账户的权限(chmod)

以上就介绍了ci框架中遇见的一些错误和解决方法 笔记,包括了方面的内容,希望对php教程有兴趣的朋友有所帮助。

Posted in 未分类