Forums

[resolved] Parse error on header.php (7 posts)

  1. draquo
    Member
    Posted 2 years ago #

    Hi everybody!

    I have this existing wordpress site that I just recently get my hands on. The site is working properly on the web server. I am making modifications on the site, but the way I'm doing it is I'm doing the changes first on my local pc with XAMPP. I copied all the files from the webhost to my local pc. The index.php (home page)is working well, but whenever I navigate thorugh the pages, I'm getting this error - "Parse error: syntax error, unexpected $end in c:\xampp\htdocs\wp-content\themes\[theme name]\header.php on line 92." I replaced the real theme name with [theme name] here for privacy purposes.

    Have anyone of you encountered this error before? Please help.

    Thanks,
    draquo

  2. Samuel B
    moderator
    Posted 2 years ago #

    I assume you have already tried dropping a fresh header.php in the folder?

  3. draquo
    Member
    Posted 2 years ago #

    hi samboll,

    what do you mean by dropping a fresh header.php? I just used the same header.php i downloaded from the server. Do I have to do something else?

    Thanks!

  4. Samuel B
    moderator
    Posted 2 years ago #

    that should work on localhost if working on website, but I meant from a fresh download of the theme zip
    sometimes files are corrupted in uploading/downloadin

  5. draquo
    Member
    Posted 2 years ago #

    Yes, I already did that twice and still getting the same error. :(

  6. draquo
    Member
    Posted 2 years ago #

    Hi,

    I already solved this matter. I change all <? in my header.php to <?php. I found out that local server does not accept <?, they have to be in <?php.

    Now, all is working well.

  7. fortuneee
    Member
    Posted 1 year ago #

    Hi draquo,

    thank you very much for the solution.
    I had the same problem and now, all is working well as well.

Topic Closed

This topic has been closed to new replies.

About this Topic