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

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/

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

报告相同问题?

悬赏问题

  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错
  • ¥15 这个主板怎么能扩出一两个sata口
  • ¥15 不是,这到底错哪儿了😭
  • ¥15 2020长安杯与连接网探
  • ¥15 关于#matlab#的问题:在模糊控制器中选出线路信息,在simulink中根据线路信息生成速度时间目标曲线(初速度为20m/s,15秒后减为0的速度时间图像)我想问线路信息是什么