• Resolved dustyroads

    (@dustyroads)


    I kept getting a fatal error when trying to install AMP, and found the following solution online:

    1. Open anarchy_media_player.php
    2. Change this:
    Code:
    require_once str_replace($_SERVER[‘SCRIPT_NAME’], ”,
    $_SERVER[‘SCRIPT_FILENAME’]) .’/wp-config.php’;

    To this:
    Code:
    require_once dirname(dirname(dirname(dirname(__FILE__)))).’/wp-config.php’;

    FYI.

Viewing 3 replies - 1 through 3 (of 3 total)
  • I’m at Dreamhost.
    I got a fatal error when installing AMP 2.5 into WP 2.7 and then found the workaround mentioned above.
    The error stated:

    Warning: require_once(/home/myserver/me/myblog.com/wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /home/.myserver/me/myblog.com/blog/wp-content/plugins/anarchy_media/anarchy_media_player.php on line 20
    
    Fatal error: require_once() [function.require]: Failed opening required '/home/me/myblog.com/wp-config.php' (include_path='.:/usr/local/php5/lib/php:/usr/local/lib/php') in /home/.myserver/me/myblog.com/blog/wp-content/plugins/anarchy_media/anarchy_media_player.php on line 20

    So as per the suggestion above I replaced

    require_once str_replace($_SERVER['SCRIPT_NAME'], '',
    $_SERVER['SCRIPT_FILENAME']) .'/wp-config.php';

    with

    require_once '/home/.myserver/me/myblog.com/blog/wp-content/plugins/anarchy_media/anarchy_media_player.php';

    and was able to install AMP, but it’s not working. It’s not finding my mp3s and attaching the flash player etc. Could there be something wrong with the directory path I used? Any other suggestions?
    Thanks

    is your wordpress located in your root directory?
    ex: it is in the public_html not in a directory inside the public_html

    My WP is in a Directory inside my site.
    /home/.myserver/me/myblog.com/blog/wp-content/plugins/anarchy_media/anarchy_media_player.php
    (the above mentioned hack) got the plug-in installed, but the plug-in isn’t finding the mp3 etc. files with which to do its thing. The example player/mp3 situated within the Settings for AMP works as advertised, so YES! I think it is a path issue.
    Thanks for asking.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error for Anarchy Media Player’ is closed to new replies.