session_start():Session data file is not created by your uid
2017-04-11 16:23
811 查看
问题概要
前几天公司给配置了电脑,为MAC系统,刚刚配置了apache、ngnix、php5.6和php7.0。所以把以前笔记本电脑中的项目拷贝到公司电脑。就出现了如下图错误。问题分析
通过tp5.0框架给的提示,可以很明显看出来,session文件不是由自身的uid所创建的。当时因为本人怀疑自身的英语水平所以百度翻译了一下(如下图)。并且我用tp3.2和5.0裸框架试了一下发现没有出现这个错误。由此我得出了以下几个结论。
1.可能我的环境配置出现了问题。
2.可能因为MAC系统权限安全方面做得比较好,本人怀疑因权限问题导致。
3.只要是一使用session就会出现问题,肯定跟session有关。
注意:根据最后成功的结果我发现,前面这几个分析都没有分析到重点,说到这里小编实属惭愧。
尝试的解决方法
1.因为无论是在apache还是ngnix环境下都是出现同样的错误,所以基本排除是这两种环境的问题,所以重新安装了一下php5.6和7.0。结果:失败。
2.首先把找到存储session的文件夹把权限改为读写操作,没有成功。最后把整个磁盘的权限都改为了读写操作。
结果:失败
3.弄了两个多小时一激动把存放session的文件删除了。结果:成功。 分析: 不管是Google还是百度都用了都没有找到具体的原因。自己分析了一下,因为前几天弄电脑配置的时候曾经用项目做过测试,已经生成了session文件,然后这两天一直再改配置,apache、ngnix、php卸了装,装了卸。导致其访问的权限受限,所以删除以后,当重新运行项目的时候重新创建了一个session文件。最后问题解决。
相关文章推荐
- Warning: session_start() [function.session-start]: open_basedir restriction in effect. File(F:/Windows/TEMP/) is not within the
- 解决cakePHP中的. session_start()[function.session-start];open_basedir restnction in effect.File(c:/windows/temp/)is not within the a
- Error 24 Could not delete file 'e:/debug/vc80.idb'. Make sure that the file is not open by another p
- SSH error:a public key file has not been specified by this session
- 解决Qt for Embedded Linux data directory is not owned by user 0h 错误提示 问题
- /dev/sdb1 is apparently in use by the system; will not make a filesystem here!
- /dev/hdb1 is apparently in use by the system; will not make a filesystem here!解决方法
- The project file .csproj cannot be opened." The project type is not supported by this installation.
- 今天又搞到个libDTL.so is not an ELF file - it has the wrong magic bytes at the start.
- 【IIS】the process can not access the file because the file is being used by another process
- Qt/Embedded data directory is not owned by user 0: /tmp/qtembedded-0
- Why is error code -36 (FS_FILE_EXISTS) returned by FS_CreateDir just after memory card is removed
- fatal error C1853: 'Debug/***.pch' is not a precompiled header file created with this c
- Linux系统下出现"The ext4 file system is not supported by you system""
- linux oracle ORA-01221: data file 1 is not the same file to a background process
- install fms in linux: error: if you have warned ERROR: Your distribution, unknown, is not supported by this
- 分区无法格式化?/dev/sda2 is apparently in use by the system; will not make a filesystem here!
- 关于fatal error C1853: 'Debug/TrafficDet.pch' is not a precompiled header file created with this compiler
- vc6 编辑出现错误“ **.pch is not a precompiled header file created with this compiler"
- ORA-27054: NFS file system where the file is created or resides is not mounted with correct options