• Hello guys, I am having problems on one site I am making only, the others seem to be working fine. the website is https://www.andrewpikeresearch.com

    When I try to log into the website I just get two messages:

    Notice: add_custom_background is deprecated since version 3.4! Use add_theme_support( ‘custom-background’, $args ) instead. in /home/andrewpi/public_html/wp-includes/functions.php on line 2628

    and

    Warning: Cannot modify header information – headers already sent by (output started at /home/andrewpi/public_html/wp-includes/functions.php:2628) in /home/andrewpi/public_html/wp-includes/pluggable.php on line 881

    On the face of the website it only displays the first notice.

    For the warning, I have found https://codex.www.ads-software.com/Answers-Troubleshooting#Headers_already_sent

    Which seems to explain the answer, only I have opened functions.php in notepad and the first <?php is there but I can after scrolling down through masses of text on the last line I can not see ?> at all. So the correct thing to do would be to add it as the last thing on the page right?

    Would love to know what I can do to fix this.

    Regards

    laltoofan

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter laltoofan2

    (@laltoofan2)

    Ok, I have just added ?> at the very end of the document uploaded after backing up the original and nothing has changed, still the same problem, did it as instructed from https://codex.www.ads-software.com/Answers-Troubleshooting#Headers_already_sent

    FIRST U HAVE TO DELETE THAT FUNCTION then check what problem
    or which function u have error

    You need not add ?> at the end of functions.php file. Instead, you can try placing the cursor just before the last semi-colon and press the delete key for about 15 seconds. Then type the semi-colon and save it and upload. DO NOT press any key after typing the semi-colon. Similarly, press the backspace after placing the cursor just before the starting < in the first line (<?php). Perhaps, this may solve the problem.

    Thread Starter laltoofan2

    (@laltoofan2)

    Hi Mukesh, Not really sure what you mean, u saying I should delete functions.php then do what? I know next to nothing about this so you need to explain to me as simple as possible or I will not know what to do?

    Hi Krishna, seems I do not have a semi-colon at the end of the file but a curly bracket, it looks like this:

    /
    function _device_can_upload() {
    	if ( ! wp_is_mobile() )
    		return true;
    
    	$ua = $_SERVER['HTTP_USER_AGENT'];
    
    	if ( strpos($ua, 'iPhone') !== false
    		|| strpos($ua, 'iPad') !== false
    		|| strpos($ua, 'iPod') !== false ) {
    			return preg_match( '#OS ([\d_]+) like Mac OS X#', $ua, $version ) && version_compare( $version[1], '6', '>=' );
    	} else {
    		return true;
    	}
    }

    Thread Starter laltoofan2

    (@laltoofan2)

    Sorry, I mean that is the last line of functions.php

    Well, you may place the cursor just before the last } and press delete and do the rest as I suggested earlier.

    Thread Starter laltoofan2

    (@laltoofan2)

    tried it, didnt work, but thanks for your help! at a total loss now.

    Thread Starter laltoofan2

    (@laltoofan2)

    Do you reckon I can download another WordPress installation and find the same file there and uplaod it. If the problem is coming from there?

    Or will the functions file have changed a lot since install?

    None of the core WordPress scripts will have changed.

    Please see the different solutions for the problem known as white space under this: https://www.ads-software.com/search/Cannot+modify+header+information?forums=1

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Warning messages appearing on site!’ is closed to new replies.