• I truly hope someone can help as I think I’ve exhausted all avenues and still can’t figure it out. FYI – I went to the support forum first to see what I could find regarding this error type and searched under php fatal error require_once and read every post and response. I also called my hosting company and have sent an email to the place where I purchased the theme. I’m still having no luck and hope someone can assist.

    Here’s what I’ve done and the error: (Note: There are no plug-ins activated on this site).

    I installed WP 2.8. I uploaded the WPRemix theme. Within this theme, you have the ability to select templates and then “send to editor.” Sounds easy enough. However, I get the following error code:

    Warning: require_once(/home/easyde5/public_html/wp-content/wp-config.php) [function.require-once]: failed to open stream: No such file or directory in /home/easyde5/public_html/wp-content/themes/wpremix_3_single/wpremix3/editor/RemixEditor.php on line 9

    Fatal error: require_once() [function.require]: Failed opening required ‘/home/easyde5/public_html/wp-content/wp-config.php’ (include_path=’.:/usr/lib/php:/usr/local/lib/php’) in /home/easyde5/public_html/wp-content/themes/wpremix_3_single/wpremix3/editor/RemixEditor.php on line 9

    I then went to my control panel and confirmed with the hosting company that these files exists. Here’s the content within the Remix editor:

    RemixEditor.php
    PHP script text
    <?php
    /*From https://planetozh.com/blog/2008/07/what-plugin-coders-must-know-about-wordpress-26/*/
    $root = dirname(dirname(dirname(dirname(dirname(__FILE__)))));
    if (file_exists($root.’/wp-load.php’)) {
    // WP 2.6
    require_once($root.’/wp-load.php’);
    } else {
    // Before 2.6
    require_once($root.’/wp-config.php’);
    }
    header(‘Content-Type: text/html; charset=’.get_option(‘blog_charset’).”);
    if (isset($_POST[‘action’]) && isset($remix_advanced_editor)) {
    check_admin_referer(“wp-remix-advanced-editor”);
    $postID = isset($_POST[‘pid’])? (int) $_POST[‘pid’] : 0;
    $action = $_POST[‘action’];
    $page = (string)$_POST[‘page’];
    //Remove sidebar custom field
    $remix_advanced_editor->remove_template_custom_field($postID, ‘_wp_remix_page_sidebar’);
    if ($action == “sent_to_editor”) {
    $file = $remix_advanced_editor->templatepath . “/” . $page;
    if (!is_file($file)) {
    $remix_advanced_editor->remove_template_custom_field($postID, ‘_wp_remix_page_template’);
    die(”);
    }
    $f = fopen($file, ‘r’);
    $content = fread($f, filesize($file));
    //Add a custom field, let’s us know which template is being use
    $response = new WP_Ajax_Response();
    $remix_advanced_editor->add_template_custom_field($postID, ‘_wp_remix_page_template’, $page);
    $response = $remix_advanced_editor->get_content_options($postID, $content);
    $content = $remix_advanced_editor->get_content_to_edit($postID, $content);
    $response->add( array(
    ‘what’ => ‘content’,
    ‘id’ => $postID,
    ‘data’ => $content
    ));
    $response->send();
    }
    }
    ?>

    Any assistance would be greatly appreciated. Thank you.

    Kathy

Viewing 3 replies - 1 through 3 (of 3 total)
  • Try changing the line:

    $root = dirname(dirname(dirname(dirname(dirname(__FILE__)))));

    To:

    $root = dirname(dirname(dirname(dirname(__FILE__))));

    Looks like you’re path is /home/easyde5/public_html/wp-content/wp-config.php

    [signature moderated Please read the Forum Rules]

    A better idea might be to change:

    $root = dirname(dirname(dirname(dirname(dirname(__FILE__)))));

    To:

    $root = realpath(__FILE__);

    [signature moderated Please read the Forum Rules]

    Hi,

    I’ve had the same problem with the wp-config.php file. After reading this article I adjusted the
    $root = dirname(dirname(dirname(dirname(dirname(__FILE__))))); to $root = realpath(__FILE__);. Now wordpress shows a parse error:

    Parse error: parse error in C:\wamp\www\internet\wp-content\themes\wpremix_3_single\wpremix3\editor\RemixEditor.php on line 11

    This is what’s on line 11:

    header('Content-Type: text/html; charset='.get_option('blog_charset').'');

    Any help would be geatly appreciated, I’m not very familiar with PHP.
    Thanks,
    BigML

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘php fatal error require_once’ is closed to new replies.