WordPress.org

Ready to get started?Download WordPress

Forums

Aaaaaghhh !!! Fatal Error (9 posts)

  1. psybertron
    Member
    Posted 9 years ago #

    My blog URL (www.psybertron.org) now simply returns this error
    Fatal error: Call to undefined function: get_header() in /home/.hari/psybertron/psybertron.org/index.php on line 4

    Worked fine yesterday - edited inside header block in index.php - didn't work, restored original index.php from the theme folder - didn't return to original ...

  2. yuh
    Member
    Posted 9 years ago #

    do you use a theme by yourself or another one, perhaps self made?

    if u upload and use ftp be sure that you use ascii mode to up/download files.....or if your tool / ftp-programm allows you use auto mod.

    then clear the index.php and upload the new one. actualize and this should work. i think your problem was, that you have forgotten to end a section in this index.php because the header isn´t reachable. but your error is in line 4

    hope the mode function was the problem

  3. psybertron
    Member
    Posted 9 years ago #

    I'm using "Journalized Blue" theme.

    As I said, even if I did make an error editing first time - I've re-uploaded the original theme and re-set as the active theme - the edited file is long gone.

    I'm pretty sure I'm using ascii mode in Filezilla (in fact I have auto set.)

  4. I assume you are running 1.5.1 - The index.php error looks like you've changed the index.php in the root of the wordpress install rather than within a theme - try restoring the index.php file to look like this one and see if that helps - http://trac.wordpress.org/file/tags/1.5.1/index.php

    westi

  5. psybertron
    Member
    Posted 9 years ago #

    Line 4 is the line containing get_header().

    The header block I edited (and restored) is later - all versions of index.php in my domain (root, theme, etc) are currently identical to the default in the Journalized Blue theme. WTF ?

  6. psybertron
    Member
    Posted 9 years ago #

    That's corrcet Westi.

    Just confirm - when you say restore the index.php - which one - in the root or the theme ?

  7. Michael Bishop

    Posted 9 years ago #

    I'm guessing root. Otherwise, you could log into wp-admin, change themes, and the site would work. If you borked the the root index.php file, you just might not get anything.

  8. psybertron
    Member
    Posted 9 years ago #

    Right - got it. the index.php files in the different directories are meant to be different. Doh!

    I've re-instated the one in the root with the original WordPress default (for the root) and now it's OK.

    So let me get this right - when I select a theme, WordPress uses the actual files in that theme folder - not copies based on them, in the root folder. Useful to know.

  9. Yes the index.php in the root is a core wordpress file - it pulls in the index.php from the theme later on in the wordpress code.

    This was done so that you can easily upgrade wordpress versions without losing you customised theme compared to the old 1.2 way of editing the index.php in the root.

    westi

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags