032010

Solve drupal open_basedir restriction realpath problem

Category: PHPlixiphp @ 1:40 下午

Hi all, I am very fortunate to slove a drupal problem for you concerning the drupal open_base restriction problem, I will speak english to tell you that three points.

Firstly, I will show you the problem on vitual host site tmp/ error.

warning: open_basedir restriction in effect.

Error with file api and open_basedir restriction

warning: realpath() [function.realpath]: open_basedir restriction in effect. File(/var/tmp) is not within the allowed path(s): (/home1/vhost/vh449538:/home1/vhost/vh449538/temp:/tmp/expl:/tmp/check) in /home1/vhost/vh449538/www/drupal/includes/file.inc on line 190.

Second, I have found some discussion on the drupal site. They also have this problem but I think the solution is not great.

I thiink I should not modify the drupal core, Its very complex to upgrade your drupal core and maybe others completely dont know where is the problem.

therefor, We should config our setting File system Tell Drupal where to store uploaded files and how they are accessed.

Perfectly, Administrator  Site configuration the file system

Firstly, the site will alert you the /var/tmp is unavailable and dont has the directory, then please go to the place like below:

Home » Administer » Site configuration

Temporary directory: /var/tmp

A file system path where uploaded files will be stored during previews.

change the value from the absolute path /var/temp  to relative path tmp, but you must confirm your site has the directory and its permission is writeable, chmod is 0777.

Finally, the problem is ok, This is my shared drupal issue. thank you!

声明:本站遵循署名-非商业性使用-相同方式共享 3.0共享协议. 转载请注明转自LixiPHP

标签: , , , , ,

相关信息

  • 推荐网址:

  • 收藏+分享: Del.icio.us Google书签 Digg Live Bookmark Technorati Furl Yahoo书签 Facebook 百度搜藏 新浪ViVi 365Key网摘 天极网摘 和讯网摘 博拉网 POCO网摘 添加到饭否 QQ书签 Digbuzz我挖网

欢迎写下您的评论,其中 * 为必填项目

这里写下你想说的话

 wink neutral mad twisted :) eek sad rolleyes razz redface surprised mrgreen lol idea biggrin evil cry cool arrow confused question exclaim