本文介绍了“在标头之前的脚本输出结束".在CentOS上使用,但在其他LAMP堆栈上使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经设置了一个Centos 6 + CPanel 11 VPS,一切就在开箱即用的状态.我已经在public_html目录中安装了Phorum 5.2.20,但是Phorum导致了错误500.错误日志报告:

I've set up a Centos 6 + CPanel 11 VPS, and everything is as it was out of the box. I've installed Phorum 5.2.20 in the public_html directory, but Phorum is causing an error 500. The error log reports:

[2015年7月27日星期一11:21:57.770447] [core:error] [pid 14342] [client x.x.x.x:42531]标头之前的脚本输出结束:admin.php

[Mon Jul 27 11:21:57.770447 2015] [core:error] [pid 14342] [client x.x.x.x:42531] End of script output before headers: admin.php

代码在我的Debian LAMP服务器(以及我用来测试此问题的其他几个非Centos/CPanel LAMP堆栈)上正常工作,而Wordpress和其他一些东西在CentOS机器上运行良好.

The code works fine on my Debian LAMP server (and several other non-Centos/CPanel LAMP stacks I've used to test this), and Wordpress and some other stuff runs fine on the CentOS machine.

我也尝试了其他代码,它可以在其他服务器上运行,但不能在CentOS上运行.Phorum是唯一重要的代码,因此我提出了对此的疑问.我也不愿意编辑Phorum的核心文件.

I've tried other code too, and it works on my other servers, but doesn't work on CentOS. Phorum is the only code that matters, so I made question focuses on that. I'm also reluctant to edit the core files of Phorum.

有什么想法吗?

推荐答案

已修复:权限问题

在VPS上全新安装后,我也遇到了同样的问题,后来我发现这是一个权限问题,目录应该是755,文件应该是644,然后它才起作用.

I have also faced the same issue after installing fresh installation on VPS, later I found It's a permission issue, Directory should be 755 and files should be 644 then only it works.

sudo chmod -R 755 projectfolder

这篇关于“在标头之前的脚本输出结束".在CentOS上使用,但在其他LAMP堆栈上使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-11 10:00