WordPress.org

Ready to get started?Download WordPress

Forums

Unexpected character and Parse Error... (6 posts)

  1. cdCrash
    Member
    Posted 9 years ago #

    I just installed 1.5.1 and I'm getting an odd error:

    If I click on "Previous Entries" on my main page, I'm getting the following error:

    Warning: Unexpected character in input: ' ' (ASCII=12) state=1 in /usr/local/dh/cgi-system/php.cgi on line 2966

    Parse error: parse error, unexpected T_STRING in /usr/local/dh/cgi-system/php.cgi on line 2966

  2. cdCrash
    Member
    Posted 9 years ago #

    oops double post~!

  3. cdCrash
    Member
    Posted 9 years ago #

    Ok, thanks to carthik on #wordpress on IRC, I found the problem...

    http://photostack.org/forum/viewtopic.php?pid=401

    basically, change the line

    $index = $_SERVER['SCRIPT_NAME'];
    in the file:
    wp-includes/template-functions-links.php
    to:
    $index = $_SERVER['PHP_SELF'];

    There's one other file with the variable $_SERVER['SCRIPT_NAME'] in it:
    wp-settings.php

    If I find anymore problems, I'll change it there too.

    I think this has a lot to do with running PHP as CGI.

  4. blikum
    Member
    Posted 9 years ago #

    Oh, hell yes! Thank you. This post just fixed a buggin' issue on my site. On my index.php page the page pagination wasn't working and I was getting the same "cgi-system" issue in my urls. I made the above change and it fixed it. Nice find cdCrash.

  5. iiedwinii
    Member
    Posted 9 years ago #

    Same here :) Thanks A Lot!

  6. nerdgirl
    Member
    Posted 8 years ago #

    You rock! Thanks so much.

Topic Closed

This topic has been closed to new replies.

About this Topic