Error establishing a database connection (Cannot modify header information)
-
Hi,
I’ve a big (database connection) problem after moving my website to a new registrar.
This is the error I get:
Warning: Cannot modify header information – headers already sent by (output started at /home/iphone1q/public_html/wp-config.php:1) in /home/iphone1q/public_html/wp-includes/functions.php on line 3503
Error establishing a database connection
This is the wp-config file:
<?php /** Enable W3 Total Cache */ define('WP_CACHE', true); // Added by W3 Total Cache /** Enable W3 Total Cache Edge Mode */ define('W3TC_EDGE_MODE', true); // Added by W3 Total Cache /** * The base configurations of the WordPress. * * This file has the following configurations: MySQL settings, Table Prefix, * Secret Keys, and ABSPATH. You can find more information by visiting * {@link https://codex.ww.wp.xz.cn/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 */ // ** MySQL settings - You can get this info from your web host ** // /** The name of the database for WordPress */ define('DB_NAME', 'iphone1q_1'); /** MySQL database username */ define('DB_USER', 'iphone1q_iphone'); /** MySQL database password */ define('DB_PASSWORD', ‘xxxx’); /** MySQL hostname */ define('DB_HOST', 'localhost'); /** Database Charset to use in creating database tables. */ define('DB_CHARSET', 'utf-8'); /** The Database Collate type. Don't change this if in doubt. */ define('DB_COLLATE', ''); define( 'WP_ALLOW_REPAIR', true ); /**#@-*/ /** * WordPress Database Table prefix. * * You can have multiple installations in one database if you give each a unique * prefix. Only numbers, letters, and underscores please! */ $table_prefix = 'wp_'; /** * For developers: WordPress debugging mode. * * Change this to true to enable the display of notices during development. * It is strongly recommended that plugin and theme developers use WP_DEBUG * in their development environments. */ define('WP_DEBUG', false); /* That's all, stop editing! Happy blogging. */ /** Absolute path to the WordPress directory. */ if ( !defined('ABSPATH') ) define('ABSPATH', dirname(__FILE__) . '/'); /** Sets up WordPress vars and included files. */ require_once(ABSPATH . 'wp-settings.php') ?>This is line 3503 in functions.php:
header( 'Content-Type: text/html; charset=utf-8' );Does someone know what the problem could be?
Many thanks!
Kind regards,
Roy
The topic ‘Error establishing a database connection (Cannot modify header information)’ is closed to new replies.