CI3.0加载session类后报500 Internal Server Error错误
PHP5.3下没有问题,一切换到PHP5.4就不可以了看过配置,PHP5.3与5.4的session.auto_start值均为0,5.4就是不行
PHP5.4使用原生session start,并直接使用$_SESSION全局数组是没问题的,说明session是开启的
就是一加载session类就出错,然而把php.ini里的session.auto_start设置为1 就可以了,这是为什么呢?
按说程序里手动加载和这个自动加载应该没什么关系的啊。 Apaceh错误日志:
End of script output before headers: index.php
End of script output before headers: index.php
AH02538: Child: Parent process exited abruptly. Child process is ending
Starting the Apache2a service
The Apache2a service is running.
AH00098: pid file E:/phpStudy/Apache/logs/httpd.pid overwritten -- Unclean shutdown of previous Apache run?
AH00455: Apache/2.4.10 (Win32) OpenSSL/0.9.8zb mod_fcgid/2.3.9 configured -- resuming normal operations
AH00456: Apache Lounge VC9 Server built: Jul 19 2014 13:20:51
AH00094: Command line: 'E:\\phpStudy\\Apache\\bin\\httpd.exe -d E:/phpStudy/Apache'
AH00418: Parent: Created child process 4904
AH00354: Child: Starting 150 worker threads.
End of script output before headers: index.php 本帖最后由 sxycyrz 于 2016-1-26 12:27 编辑
Michael锐生 发表于 2016-1-26 10:27
是你改了什么东西吧?CI3.0里面默认是不能开启session.auto_start的,不然没办法正常使用 ...
刚下载的CI,还没有改过
http://codeigniter.org.cn/forums/thread-22083-1-1.html
这位朋友好像也是遇到的这种问题
我参考他的把session.auto_start设置为1后果然能用了,但是实在无法理解,因为即使不开启,我自己建 了一个test文件使用session都是正常的
wish751 发表于 2016-4-19 17:14
我也和你遇到同样的问题
windows php环境5.4
注释 system\libraries\Session\Session.php 107行 session_ ...
刚才遇到了同样的问题。按照您的方法修改后真的没有问题了。我的是CI3.1,请问,为什么注释 了这一行就可以了呀? 是你改了什么东西吧?CI3.0里面默认是不能开启session.auto_start的,不然没办法正常使用 sxycyrz 发表于 2016-1-26 12:22
刚下载的CI,还没有改过
http://codeigniter.org.cn/forums/thread-22083-1-1.html
感觉还是代码哪里出了问题,用Xdebug追踪看一下吧,我也没什么头绪 把PHP错误提示打开应该能看到具体报错。 Hex 发表于 2016-2-1 10:54
把PHP错误提示打开应该能看到具体报错。
display_errors = off后还是报500的错误。。PHPstudy lite 2014 sxycyrz 发表于 2016-2-4 12:01
display_errors = off后还是报500的错误。。PHPstudy lite 2014
难道不是应该等于 on ? 本帖最后由 sxycyrz 于 2016-2-4 14:28 编辑
Hex 发表于 2016-2-4 12:01
难道不是应该等于 on ?
原来是on,报500,我改成off,还是500...嗯...改后也重启Apache了 sxycyrz 发表于 2016-2-4 14:30
Apaceh错误日志:
End of scr ...
看起来不是 PHP 的问题。。。
页:
[1]
2