WordPress.org

Ready to get started?Download WordPress

Forums

parse error in Nicer Archives (14 posts)

  1. anatman
    Member
    Posted 10 years ago #

    Hi,
    I am trying to install the Nicer Archives hack, this one i mean:
    http://dinki.mine.nu/weblog/b2-img/narchives.phps
    But i get a parse error on line 42. Would someone give me a hand with this?
    Thanks,
    Eduardo

  2. carthik
    Member
    Posted 10 years ago #

    I checked your narchives.php with mine, and they are the same, so I can't say whats wrong for sure. You could try deleting the existing narchives.php and try to get a fresh copy and try again.
    Whats the url for the narchives.php on your server, I tried yourblog.com/narchives.php but that didnt work(got a 404)

  3. Beel
    Member
    Posted 10 years ago #

    I copied your phps, saved it to my wordpress directory and it ran fine. Stumped for the moment as to why you are having trouble.

  4. anatman
    Member
    Posted 10 years ago #

    And i have trouble running both at home and on my host's server. I am lost here...

  5. anatman
    Member
    Posted 10 years ago #

    LaughingLizard, i must appeal to you, as you authored the hack - do you have any idea what is going wrong with my attempts to run it? Lots of people use the hack, i see it everywhere...

  6. Laughinglizard
    Member
    Posted 10 years ago #

    @anatman:
    I cannot reproduce the error on any server/machine. I have looked through the code, compared the code between your .phps and mine and everything is exactly the same. I have to say something is happening on your side which is causing this error. Can you give us any other information? Anything else that might be peculiar about your systems?

  7. anatman
    Member
    Posted 10 years ago #

    Thank you for replying, LL.
    This is very odd indeed, and the error is on a line saying just "global $variable, $variable;" , how can there be a parse error here?
    Well, my ISP's server runs Apache 1.3.29, and PHP 4.3.3. If you point your browser to http://www.taijiquan.pro.br/phpinfo.php , which comes in the WP distribution, you will be able to see all the info about the server's PHP. I am not sure what could be relevant because i know next to nothing about PHP.
    Also if you go to http://www.taijiquan.pro.br/narchives.php you will see the error. If there is anything (file, diagnose tool, etc) i can upload to help pinpoint the problem, please tell me and i will.
    I need the nicer archives a lot, because my site is not a blog, so archives by date make little sense to the readers.
    At home i run mac OS X (Darwin Kernel 7.2.o) and PHP 4.3.2, but i don't have a fixed IP to point you too so you can see my phpinfo, my connection is dial-up. The error shows the same here.

  8. carthik
    Member
    Posted 10 years ago #

    Okay, one more suggestion. Doesn't hurt I guess. Go to the end of line 41. After the { press delete, till you remove all the whitespaces/blanks/linebreaks, till the next line pops up and the first letter of the next line comes right next to the {
    Then press enter, save and try running again.
    If that don't work, try the same with line 42.
    try entering two blank lines before line 42, and see if the parse error Line number changes, and thats a way of identifying what's causing the error. That's what all I'd do.

  9. anatman
    Member
    Posted 10 years ago #

    Ha! That seems to help (removing all identation, i mean). I tried editing on the cPanel editor, the i removed everithing until the "g" from "global" touched the {. When i ran it, the error was in line 42 - that is, the next line, not the one saying "global etc". So i removed the leading identation from the next two lines (but not the line breaks), and the error went to line 44.
    I guess i will have to do a big clean up. I will post back as soon as i do it.
    Thanks!

  10. Laughinglizard
    Member
    Posted 10 years ago #

    sweet! Glad you got it working, had me stumped there for a while!

  11. carthik
    Member
    Posted 10 years ago #

    There you go :) Strange things fill up the voids in code.

  12. dss
    Member
    Posted 10 years ago #

    so that's all you do?
    just upload the narchives.php and rework your archives link?
    crazy-town.
    dss

  13. anatman
    Member
    Posted 10 years ago #

    Yep, that's all you do. If you have tweaked hte index.php menu div, you you the same to the menu div in narchives.php so it stays the same, and it's done.

  14. petelawley
    Member
    Posted 10 years ago #

    Believe it or not anatman isn't the only one with this problem. I had exactly the same error on exactly the same line. I'm using Mac OS X as well so that could be the problem.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.