问题描述
这是一道二次注入题,注册完成后,应该登录然后修改密码,但是登录的时候出现:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /var/www/html/Less-24/login.php:9) in /var/www/html/Less-24/login.php on line 11
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/Less-24/login.php:9) in /var/www/html/Less-24/login.php on line 44
Warning: Cannot modify header information - headers already sent by (output started at /var/www/html/Less-24/login.php:9) in /var/www/html/Less-24/login.php on line 45
解决方法
这是php.ini配置里的一点问题。
找到自己的php.ini,把两个参数修改一下:
session.auto_start=0 修改为 session.auto_start=1
不太清楚这个是什么问题,据说是“UTF8文件的BOM(Byte Order Mark)标志,在保存的时候会自动存入!”
output_buffering = Off 修改为 output_buffering = On
打开所有php程序的输出缓存
修改完以后重启一下apache,就可以了
参考资料
https://www.cnblogs.com/dabaixiong/articles/5186274.html
https://www.pzboy.com/soft/php/header/