doucou19961205 2016-07-24 12:07
浏览 121
已采纳

Wordpress mysql问题 - open_basedir限制生效

I just a wordpress web from a test hosting to the clients hosting. Both hosted by the same provider, however, the new page is showing a php error message in main navigation menu (http://www.marianrehak.net/). The error message is:

"Warning: file_exists(): open_basedir restriction in effect. File(/data/web/virtuals/115731/virtual/www/wp-content/themes/bellevue/dynamic.css) is not within the allowed path(s): (/data/web/virtuals/137976/virtual) in /data/web/virtuals/137976/virtual/www/wp-content/themes/bellevue/option-tree/includes/ot-functions.php on line 238 (/data/web/virtuals/115731/virtual/www/wp-content/themes/bellevue/dynamic.css)

Line 238 of the specified file is:

if ( '' != $path && file_exists( $path ) ) {
      $parts = explode( '/wp-content', $path );
      if ( isset( $parts[1] ) ) {
        $css = set_url_scheme( WP_CONTENT_URL ) . $parts[1];
        if ( $last_css !== $css ) {
          /* enqueue filtered file */
          wp_enqueue_style( 'ot-dynamic-' . $key, $css, false, OT_VERSION );
          $last_css = $css;

Could you please suggest what the problem might be? Thank you very much for any ideas (I've been trying to figure this out for hours)!

  • 写回答

1条回答 默认 最新

  • dongpo8250 2016-07-24 12:16
    关注

    It seems that the absolute path is set up somewhere - maybe at the db.

    Because of this, Wordpress on the new account tries to load the file from the old account.
    You need to find every place where the old path /data/web/virtuals/115731/ is defined and replace it with the new path: /data/web/virtuals/137976/

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?