3 Wordpress Errors, Please Help

Discussion in 'WordPress' started by mokimofiki, Jan 22, 2013.

  1. #1
    I am getting the following errors when logged in to admin area. It allows me to navigate but never save anything.

    Warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'retailpos::admin_init' was given in /home/mood/public_html/wp-includes/plugin.php on line 405

    Warning: Cannot modify header information - headers already sent by (output started at /home/mood/public_html/wp-includes/plugin.php:405) in /home/mood/public_html/wp-includes/functions.php on line 861

    Warning: Cannot modify header information - headers already sent by (output started at /home/mood/public_html/wp-includes/plugin.php:405) in /home/mood/public_html/wp-includes/functions.php on line 862

    Any insight would be appreciated. Thank you in advance.

    (by the way there is no line 405, 861 or 862 and that is making it more difficult to find the issue)
     
    mokimofiki, Jan 22, 2013 IP
  2. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #2
    1) It looks like a plugin may be causing a problem. Disable and remove all your plugins and see if that fixes the problems. If it does, add them in, one at a time, until the problem reappears. The last plugin you added is the one that's causing the problem.

    2) Those lines do exist - in the PHP code, as it's generated by WP. The problem is that the files are a mixture of PHP and other things, so it's not that line number in the file.
     
    Rukbat, Jan 22, 2013 IP
  3. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    I removed all plugins and still got the error. I have however copied clean files over the existing Wordpress files and all is good now. The issue was with something that the client had changed in their file structure. Looks like someone was playing somewhere they shouldn't have. Thank you for the response.
     
    mokimofiki, Jan 22, 2013 IP
  4. webmaster.

    webmaster. Active Member

    Messages:
    365
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    68
    #4
    Warning: Cannot modify header information - headers already sent by (output started at /home/mood/public_html/wp-includes/plugin.php:405) in /home/mood/public_html/wp-includes/functions.php.



    Check did you do any modification in PHP code at header.php. it may be a syntax error (PHP)
    In Premium Theme, you can't change or modify the links, if you try to do it then it give error -Warning: Cannot modify header information.


     
    webmaster., Jan 25, 2013 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    That particular error just means that the program is trying to send headers after headers have been sent. It usually happens when you send a header after text has been sent, because before the first character of text is sent, PHP sends headers. So having a blank line in a PHP file and then sending a header doesn't work. (The blank line is sent as text, which sends headers.)
     
    Rukbat, Jan 26, 2013 IP
  6. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #6
    Thank you for the replies, I have however narrowed the issue down to the retailpos::admin_init part. Something that was added by the client was trying to add a hook for a custom admin menu item that was trying to pull header information through after including an empty file. Took out the empty include and all is fine.
     
    mokimofiki, Jan 28, 2013 IP
  7. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #7
    The "empty" file probably had at least 1 character in it - like a blank line. That's enough to cause PHP to send headers, after which you can't send any more headers.
     
    Rukbat, Jan 28, 2013 IP