简体   繁体   English

移动了Wordpress网站,现在它无法修改标题信息

[英]Moved Wordpress Website, Now it Cannot modify header information

I moved my Wordpress-based website from an Apache server to a Nginx server, and something, somewhere went wrong. 我将基于Wordpress的网站从Apache服务器移到了Nginx服务器,发现某些地方出了问题。

I'm getting a mangled website (as in: CSS isn't being loaded so the lay-out is completely wrong). 我正在访问一个残缺不全的网站(如:CSS未加载,因此布局完全错误)。 When I try to access /wp-admin to log in, I get: 当我尝试访问/ wp-admin登录时,我得到:

Warning: Cannot modify header information - headers already sent by (output started at /var/hpwsites/u_potgieter/website/html/webroot/wp-config.php:1) in /var/hpwsites/u_potgieter/website/html/webroot/wp-login.php on line 390

Warning: Cannot modify header information - headers already sent by (output started at /var/hpwsites/u_potgieter/website/html/webroot/wp-config.php:1) in /var/hpwsites/u_potgieter/website/html/webroot/wp-login.php on line 403

I was also getting error messages from WP Super Cache plugin, but I was able to disable that from PHPmyAdmin. 我也从WP Super Cache插件中收到错误消息,但是我可以从PHPmyAdmin禁用它。

Looking at the website (www.potgieter.nl), and checking firebug, I get the impression the PHP isn't being executed properly. 查看网站(www.potgieter.nl)并检查Firebug,我得到的印象是PHP没有正确执行。 As far as I understand Wordpress, it uses PHP to call things like posts, pages and CSS. 据我了解Wordpress,它使用PHP来调用帖子,页面和CSS之类的东西。 Now the text, Javascript and images are being called correctly and are displayed. 现在,可以正确调用并显示文本,Javascript和图像。 Even the slider works. 即使滑块也可以。 However, the sizing, positioning and color are all horribly wrong. 但是,大小,位置和颜色都是错误的。

I ran ps -ef from the SSH, and it showed PHP is running: 我从SSH运行了ps -ef ,它显示PHP正在运行:

UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Jun17 ?        00:00:30 /usr/lib/systemd/systemd --switched-root --system --deserialize 21
u_potgi+ 19752 19744  0 16:29 ?        00:00:00 sshd: u_potgieter@pts/0
u_potgi+ 19753 19752  0 16:29 pts/0    00:00:00 -bash
u_potgi+ 19924 19919  0 16:44 ?        00:00:00 sshd: u_potgieter@notty
u_potgi+ 19925 19924  0 16:44 ?        00:00:00 /usr/libexec/openssh/sftp-server
u_potgi+ 20774 19753  0 17:08 pts/0    00:00:00 php
u_potgi+ 20781 20776  0 17:10 ?        00:00:00 sshd: u_potgieter@pts/1
u_potgi+ 20782 20781  0 17:10 pts/1    00:00:00 -bash
u_potgi+ 20804 20782  0 17:10 pts/1    00:00:00 ps -ef

I'm runnning PHP7 我正在运行PHP7

~]$ php -v    
PHP 7.0.5 (cli) (built: Apr 19 2016 12:44:23) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
    with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

I have seen the question linked to below, and I've tried to follow the steps outlined there as best I could, but to no avail. 我已经看到了与以下内容相关的问题,并且我已尽我所能尝试遵循此处列出的步骤,但无济于事。

How to fix "Headers already sent" error in PHP 如何修复PHP中的“标头已发送”错误

I am looking for the reason the website isn't loading properly, so I can start looking for a way to solve the issue. 我正在寻找网站无法正确加载的原因,因此我可以开始寻找解决问题的方法。

Any and all help would be greatly appreciated. 任何和所有帮助将不胜感激。

Edit: this is the first bit of my wp-config.php. 编辑:这是我的wp-config.php的第一位。 There is no whitespace on line one, nor is there any other HTML before the <?php tag. 第一行没有空格,在<?php标记之前也没有任何其他HTML。

<?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information
 * by visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don't have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */

I'm not sure how well you checked the question you linked because it's answers are quite clear. 我不确定您检查链接问题的程度如何,因为答案很明确。

The error message is also clear wp-config.php:1 错误消息也很清楚wp-config.php:1

You are looking for something that will cause output to be produced on line 1 of wp-config.php 您正在寻找会导致在wp-config.php的第1行产生输出的东西

You probably have whitespace before the opening php tag 您可能在打开php标签之前有空格

eg 例如

<!-- empty line here -->
<?php
...
..

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM