The MU forums have moved to WordPress.org

Anarchy Error - Help (15 posts)

  1. kishorebudha
    Member
    Posted 15 years ago #

    Hi,

    On clicking on the Anarchy Plugin link under admin -- options results in the following error

    Parse error: syntax error, unexpected T_IF in /home/kishore1/public_html/wp-content/mu-plugins/anarchy_media/anarchy-options.php on line 1

    It works perfectly fine on my localhost setup.

  2. mohamednazmi
    Member
    Posted 15 years ago #

    This should be a support question. Actually, I'd like help with this too. It sounds like a deceptively simple problem to solve, but I'm stumped.

  3. drmike
    Member
    Posted 15 years ago #

    A lionk to teh plugin might help.

    Rather strange that it's occuring on line 1 though. Sounds like a typo in how the file is written.

  4. zeug
    Member
    Posted 15 years ago #

    Line 1? I guess it's referring to everything within if(is_plugin_page()

    I haven't seen this problem before, maybe a statement isn't terminated properly somewhere. It was built on PHP 4.4.4, what versions do you have on localhost and on your servers?

  5. mohamednazmi
    Member
    Posted 15 years ago #

    http://an-archos.com/anarchy-media-player

    The Rich Text Editor buttons and actual embedding work.

    Here's the first line of anarchy-options.php

    <?php
    /*
    Author: An-archos
    Author URI: http://an-archos.com/anarchy-media-player
    Description: Administrative options for Anarchy Media Player Mu
    */
    if(is_plugin_page() ) {load_plugin_textdomain('anarchy',$path = 'wp-content/mu-plugins/anarchy_media');$location = get_option('siteurl') . '/wp-admin/options-general.php?page=anarchy_media/anarchy-options.php';

    The server is on PHP 4.3.11.

  6. drmike
    Member
    Posted 15 years ago #

    Which version of the plugin are you running? I see 1.6.5 and 2.0.

  7. mohamednazmi
    Member
    Posted 15 years ago #

    I grabbed the code from wpmudev.org, which is 2.0 beta.

  8. mohamednazmi
    Member
    Posted 15 years ago #

    Huzzah! I downloaded the latest version from wpmudev and uploaded it, and it works now. Thanks for the support, drmike. Zeug, thanks for the great plug-in.

  9. drmike
    Member
    Posted 15 years ago #

    Actually I just downloaded the one from Zeug's site while I was waiting and it loaded fine as well.

    Hmmm, gotta admit that I like the size options in there.

    One suggestion though. See how there's a link to the usage instructions near the top of the admin page? I would write up your own and replace that link with your own.

  10. zeug
    Member
    Posted 15 years ago #

    Ok cool, and as for the usage link yeh, I haven't got around to adding a usage page to the 2.0 beta plugin yet but it's on my todo.

  11. pumpkinslayer
    Member
    Posted 15 years ago #

    I had that problem too.

    When I viewed the file on the server the line breaks and stuff had been messed up. I opened up the file locally (where it looked fine), resaved it and then uploaded it again.

    All fine now.

    I had downloaded it straight from an-archos

  12. chowanec
    Member
    Posted 14 years ago #

    I'm getting the above problem and have tried every remedy listed... Downloaded from WPMUDev.org, didn't work, opened the file locally, saved it, didn't work...

    Anyone else out there know what might cause this?

  13. andrea_r
    Moderator
    Posted 14 years ago #

    Look at it on the server itself and check to see if there are foreign characters at the beginnign of the file.

  14. chowanec
    Member
    Posted 14 years ago #

    Yep -- on the server it was all on one line, there were no LF breaks. I used EditPad and converted the file to Unix LF and it worked great.

    Thanks for the totally obvious answer that I never would have tried otherwise. :)

  15. awarner20
    Member
    Posted 14 years ago #

    I had the same issue and opening it locally, saving, then re-uploading that file worked for me...weird huh?

About this Topic

  • Started 15 years ago by kishorebudha
  • Latest reply from awarner20