サポート » 使い方全般 » 未定義数の呼び出しの意味がわからず処理方法がわからない

  • 解決済 monmacheri

    (@monmacheri)


    ずっとエラーの処理がでwきずにいます。

    公式サイトからphpファイルをダウンロードして上書き保存もしたのですが、エラーが直りません。

    致命的なエラー:/home/monmacheri/www/monmacheri6979/wp-blog-header.phpの17行目で未定義関数wp()を呼び出してください

    Wp-blog-header.phpは次の通りです。

    <?php
    /**
    * Loads the WordPress environment and template.
    *
    * @package WordPress
    */

    if ( !isset($wp_did_header) ) {

    $wp_did_header = true;

    // Load the WordPress library.
    require_once( dirname(__FILE__) . ‘/wp-load.php’ );

    // Set up the WordPress query.
    wp();

    // Load the theme template.
    require_once( ABSPATH . WPINC . ‘/template-loader.php’ );

    }

    ヘルプの必要なページ: [リンクを見るにはログイン]

8件の返信を表示中 - 1 - 8件目 (全8件中)
  • wp-load.php ファイルの1行目はどのようになっていますか?

    トピック投稿者 monmacheri

    (@monmacheri)

    あっ冒頭がおかしいですね。

    ここを直せば良かったのですね。

    何度も教えていただいたのに理解不足で申し訳ありません。

    <http://lunachandiary.com/php
    /**
    * Bootstrap file for setting the ABSPATH constant
    * and loading the wp-config.php file. The wp-config.php
    * file will then load the wp-settings.php file, which
    * will then set up the WordPress environment.
    *
    * If the wp-config.php file is not found then an error
    * will be displayed asking the visitor to set up the
    * wp-config.php file.
    *
    * Will also search for wp-config.php in WordPress’ parent
    * directory to allow the WordPress directory to remain
    * untouched.
    *
    * @package WordPress
    */

    /** Define ABSPATH as this file’s directory */
    if ( ! defined( ‘ABSPATH’ ) ) {
    define( ‘ABSPATH’, dirname( __FILE__ ) . ‘/’ );
    }

    error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR );

    /*
    * If wp-config.php exists in the WordPress root, or if it exists in the root and wp-settings.php
    * doesn’t, load wp-config.php. The secondary check for wp-settings.php has the added benefit
    * of avoiding cases where the current directory is a nested installation, e.g. / is WordPress(a)
    * and /blog/ is WordPress(b).
    *
    * If neither set of conditions is true, initiate loading the setup process.
    */
    if ( file_exists( ABSPATH . ‘wp-config.php’) ) {

    /** The config file resides in ABSPATH */
    require_once( ABSPATH . ‘wp-config.php’ );

    } elseif ( @file_exists( dirname( ABSPATH ) . ‘/wp-config.php’ ) && ! @file_exists( dirname( ABSPATH ) . ‘/wp-settings.php’ ) ) {

    /** The config file resides one level above ABSPATH but is not part of another install */
    require_once( dirname( ABSPATH ) . ‘/wp-config.php’ );

    } else {

    // A config file doesn’t exist

    define( ‘WPINC’, ‘wp-includes’ );
    require_once( ABSPATH . WPINC . ‘/load.php’ );

    // Standardize $_SERVER variables across setups.
    wp_fix_server_vars();

    require_once( ABSPATH . WPINC . ‘/functions.php’ );

    $path = wp_guess_url() . ‘/wp-admin/setup-config.php’;

    /*
    * We’re going to redirect to setup-config.php. While this shouldn’t result
    * in an infinite loop, that’s a silly thing to assume, don’t you think? If
    * we’re traveling in circles, our last-ditch effort is “Need more help?”
    */
    if ( false === strpos( $_SERVER[‘REQUEST_URI’], ‘setup-config’ ) ) {
    header( ‘Location: ‘ . $path );
    exit;
    }

    define( ‘WP_CONTENT_DIR’, ABSPATH . ‘wp-content’ );
    require_once( ABSPATH . WPINC . ‘/version.php’ );

    wp_check_php_mysql_versions();
    wp_load_translations_early();

    // Die with an error message
    $die = sprintf(
    /* translators: %s: wp-config.php */
    __( “There doesn’t seem to be a %s file. I need this before we can get started.” ),
    wp-config.php
    ) . ‘</p>’;
    $die .= ‘<p>’ . sprintf(
    /* translators: %s: Codex URL */
    __( “Need more help? We got it.” ),
    __( ‘https://codex.wordpress.org/Editing_wp-config.php&#8217; )
    ) . ‘</p>’;
    $die .= ‘<p>’ . sprintf(
    /* translators: %s: wp-config.php */
    __( “You can create a %s file through a web interface, but this doesn’t work for all server setups. The safest way is to manually create the file.” ),
    wp-config.php
    ) . ‘</p>’;
    $die .= ‘<p>‘ . __( “Create a Configuration File” ) . ‘‘;

    wp_die( $die, __( ‘WordPress › Error’ ) );
    }

    CG

    (@du-bist-der-lenz)

    現在出ているエラーは「wp-config.php」の40行目に綴り間違いがあるというものだけですね。変更前に保存したバックアップで回復させましょう。

    トピック投稿者 monmacheri

    (@monmacheri)

    本当にishitakaさんCGさんどうもありがとうございました。今回フォーラムで色々な方から色々な事を学ばせていただきました。何か実行するときはフォーラムで勉強してからにします。

    CG

    (@du-bist-der-lenz)

    レンタルサーバーのバックアップサービスも使いやすくなりました。問題があった時の助言をするためだけのものではないのでフォーラムを頼らないで、何か実行するときはバックアップするのを習慣化しませんか。些細な思いつきが、大きな勘違いだったりします。フォーラムの回答状況からもわかると思いますが、手間のかかること、あくしゃうつような相手の場合は、後回しになるものです。普通に運用していておかしいことが起こったことならいいのですが、なにか実行しようと思うときはトラブルが合っては困るサイトでは行わないのが最善です。

    トピック投稿者 monmacheri

    (@monmacheri)

    そうですね。回答をくださる方も大変ですものね。色々とありがとうございました。とても感謝しています。今回は今使用中のドメインが大幅に値上げされ、倍の更新料となり、ドメインを引っ越したのですが、ログインページのドメインだけが前のドメインのままだったのと、ブログ立ち上げ時にwordpress管理画面からサイトのurlを変更できない設定にしてしまい、色々と調べたコマンドをよく考えずに実行してしまった結果迷宮入りしてしまいました。バックアップをとることがどれほど大切かを痛感しました。

    CG

    (@du-bist-der-lenz)

    サーバーはそのままで、ドメインだけの交換であれば、現在のサーバーに新しいドメインのネームサーバが確認できてから、サーバーのコントロールパネルから、割り当てることで完了したのではないでしょうか。
    ドメインの価格は変動しますから、それとまたレジストラ次第で料金も異なります。これまでのサイトへのアクセスを財産と受け止めるか次第ですね。

    トピック投稿者 monmacheri

    (@monmacheri)

    本当にありがとうございました。今回のことで色々と学ばせていただきました。ブログの内部の構造をより深く理解するいい機会になったと思います。

8件の返信を表示中 - 1 - 8件目 (全8件中)
  • トピック「未定義数の呼び出しの意味がわからず処理方法がわからない」には新たに返信することはできません。