Results 1 to 3 of 3

Thread: Fatal Error?

  1. #1
    Join Date
    Feb 2009
    Posts
    50
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default Fatal Error?

    At the top of every one of my pages(except for the index.php page) (http://vivid-avenue.net) I'm getting this:

    Fatal error: Call to undefined function: get_header() in /homepages/31/d267335044/htdocs/layout/header.php on line 97

    It's really strange because I was changing and moving things around but I didn't even go near the "get_header()" on that particular line. I have no idea what's going on. Help? :/

    And sorry if this wasn't supposed to be in PHP.
    Last edited by sparklingsky; 04-17-2009 at 02:45 AM.

  2. #2
    Join Date
    Mar 2009
    Location
    Chennai, India
    Posts
    77
    Thanks
    16
    Thanked 7 Times in 6 Posts

    Default

    1) There is an actual php function get_headers() which you may have misspelt as get_header()

    2) You might have created your own function which has been misspelt as get_header()

    3) You forgot to include the page that has got this function or you may have changed or deleted the location of this include .

    Try to do one thing.. You have mentioned that you didn't get this error in index.php page... This means that you have either included the function properly in index.php or you haven't used it at all

    Insert this code somewhere in index.php:
    Code:
    if (function_exists('get_header'))
    { echo "The function get_header is included in this page" ;}
    If you get an output "The function get_header is included in this page" , then check which files you have included in index.php and find out which one you are missing in other pages...

  3. The Following User Says Thank You to borris83 For This Useful Post:

    sparklingsky (04-17-2009)

  4. #3
    Join Date
    Feb 2009
    Posts
    50
    Thanks
    12
    Thanked 0 Times in 0 Posts

    Default

    I actually fixed it before I saw your reply. I think that particular code was not supposed to be on the header.php file, only on the index.php because when I took the code off of the header.php it was working properly on each page and my blog was displaying correctly as well. Thanks anyway!

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •