I am looking for help and suggestions with fixing these php warnings and assume this is the right forum.
I have six consecutive PHP Warnings in my php log: “cannot modify header information – headers already sent..” as follows:
“Cannot modify header information – headers already sent by (output started at /home/mysite/public_html/wp-includes/functions.php:5420) in:
… /home/mysite/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1831
…/public_html/wp-includes/rest-api/class-wp-rest-server.php on line 1855
…/public_html/wp-admin/includes/misc.php on line 1439
…public_html/wp-includes/functions.php on line 7096
…/public_html/wp-admin/admin-header.php on line 9″
I don’t know where to find whatever it is that is outputting data too early. I cannot see or find a pattern as to what triggered the warnings or whether a plugin maybe involved. I have a child theme of Astra free, Litespeed cache, Perfmatters and two security plugins.
Or are these warnings no cause for concern and can be ignored? Do they impact server connection, page speed etc?
I am not a developer, coder and would greatly appreciate any advice.
Thank you for your time.
]]>Warning: copy() expects parameter 1 to be a valid path, object given in /htdocs/wordpress-2021/wp-content/plugins/host-webfonts-local/includes/class-download.php on line 68
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wordpress-2021/wp-content/plugins/host-webfonts-local/includes/class-download.php:68) in /htdocs/wordpress-2021/wp-admin/includes/misc.php on line 1310
Warning: Cannot modify header information - headers already sent by (output started at /htdocs/wordpress-2021/wp-content/plugins/host-webfonts-local/includes/class-download.php:68) in /htdocs/handsonmetrology/wp-admin/admin-header.php on line 9
I tried to delete the cache and the previously downloaded fonts, but these errors show up again and again. Any suggestions what I could do?
]]>So when I finally got the website to work on the localhost, I cannot go into the admin area to go to the dashboard and make the necessary changes.
When I do, this is what happens:
! ) Parse error: syntax error, unexpected ‘type’ (T_STRING) in C:\wamp\www\wp-admin\admin-header.php on line 49
Call Stack
# Time Memory Function Location
1 0.0011 164528 {main}( ) ..\index.php:0
Then I go to the admin-header.php file on line 49, and this is what it says:
$admin_body_ript type=”text/javascript”>
And this is the whole php:
<?php
wp_enqueue_style( ‘colors’ );
wp_enqueue_style( ‘ie’ );
wp_enqueue_script(‘utils’);
$admin_body_ript type=”text/javascript”>
addLoadEvent = function(func){if(typeof jQuery!=”undefined”)jQuery(document).ready(func);else if(typeof wpOnload!=’function’){wpOnload=func;}else{var oldonload=wpOnload;wpOnload=function(){oldonload();func();}}};
var userSettings = {
‘url’: ‘<?php echo SITECOOKIEPATH; ?>’,
‘uid’: ‘<?php if ( ! isset($current_user) ) $current_user = wp_get_current_user(); echo $current_user->ID; ?>’,
‘time’:'<?php echo time() ?>’
},
ajaxurl = ‘<?php echo admin_url(‘admin-ajax.php’); ?>’,
pagenow = ‘<?php echo $current_screen->id; ?>’,
typenow = ‘<?php echo $current_screen->post_type; ?>’,
adminpage = ‘<?php echo $admin_body_class; ?>’,
thousandsSeparator = ‘<?php echo addslashes( $wp_locale->number_format[‘thousands_sep’] ); ?>’,
decimalPoint = ‘<?php echo addslashes( $wp_locale->number_format[‘decimal_point’] ); ?>’,
isRtl = <?php echo (int) is_rtl(); ?>;
Can anyone help me figure out what the issue seems to be? I’m totally stuck!
Thanks,
Natalia
I tried to log into a site a built and I can get to the wp-loing.php page but when i put in my username and password i get this error! It doesn’t let me go any further, just from login in page to error page.
Fatal error: Call to undefined function wp_is_mobile() in /home/content/62/9061362/html/wp-admin/admin-header.php on line 90
I tried to reupload the admin-header.php with no success. It’s odd my site is still working perfectly at the URL, I just can’t log into wp admin and change anything. I really don’t want to have to rebuild the whole thing :S
Thank you for any help!
]]><?php
/*
Plugin Name: Verkoopstatus
Version: 1.0
*/
?>
<?php
define( 'PLUGIN_DIR', dirname(__FILE__).'/' );
if ( is_admin() ) { //run only in WP admin area
}
add_action( 'admin_menu' , 'verkoopstatus_admin_menu' );
function verkoopstatus_admin_menu() {
add_menu_page('Beheer verkoopstatus', 'Verkoopstatus', 'manage_options', 'Verkoopstatus', 'showHome', plugins_url('verkoopstatus/images/verkoopstatus-icon-2.png', 99) );
include( plugin_dir_path( __FILE__ ) . 'verkoopstatus.php');
}
?>
]]>But I can’t find an appropriate hook to this area. I tried to add get_header(); into wp-admin/admin-header.php and it works. However, I don’t want to mess up with wp core files, so is there any way to add the files?
]]>Fatal error: Call to undefined function: is_network_admin() in /home/darrellm/public_html/blog/wp-admin/admin-header.php on line 1
I usually update this way and works just fine, except this time. Appreciate any help on this. Sorry if it’s a double post – I searched around and seems every other error is different. Thanks.
]]>Parse error: syntax error, unexpected ‘*’ in /home/vs041fa/public_html/wp-admin/admin-header.php on line 16
]]>