Support » Fixing WordPress » Unexpected character and Parse Error…

  • 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

Viewing 5 replies - 1 through 5 (of 5 total)
  • oops double post~!

    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.

    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.

    Same here 🙂 Thanks A Lot!

    nerdgirl

    (@nerdgirl)

    You rock! Thanks so much.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unexpected character and Parse Error…’ is closed to new replies.