Loading

Sovled: Warning: is_dir() [function.is-dir]: open_basedir restriction in effect

when I facing this error: Warning: is_dir() [function.is-dir]: open_basedir restriction in effect for building up a test site, I know there is some configuration setting not properly, searching all around google, seems there is no perfect answer, most cases people keep asking how to fix. after searching around I go back to read the php.ini carefully, and find out how to solve it.

actually it is so simple, first you need the access to edit your php.ini file on the apache server setting.

open it for me the path is: sudo vim /usr/lib/php.ini

then search open_basedir , originally there are something in the open_basedir = .:/temp:/usr/local/apache2/htdocs

reading the notes above the open_basedir setting you will find the fix solution to it. simply set the open_basedir to nothing.

; open_basedir, if set, limits all file operations to the defined directory
; and below.  This directive makes most sense if used in a per-directory
; or per-virtualhost web server configuration file. This directive is
; *NOT* affected by whether Safe Mode is turned On or Off.

so you get the answer too, just set ” open_basedir =  ” that is all.

then don’t forget to restart your apache server, then you refresh your page, you will find it work now.

遍寻Google上关于Warning: is_dir() [function.is-dir]: open_basedir restriction in effect 错误方法的解决方案,没有找到合适的解决方法,大部分都是在询问如何解决该问题,我知道一个暂时的解决方法是添加一些你需要的文件到 open_basedir里面,但是对于一般的网站这样的文件要添加很多很多,也有网上说添加一个/tmp其实这个不是这个方法,在open_basedir参数的上面已经作了很详细的说明,要设置对一些文件的访问权限,需要设置该变量open_basedir,意思也就是说如果不设置其就不起作用,于是我把open_basedir设置为空,这样那些错误警告就不再出现了。

希望看到的同学有助于你解决这个问题。

原创:vlili.com 转载请注明:出自茉莉有香vlili.com

You can leave a response, or trackback from your own site.

One Response to “Sovled: Warning: is_dir() [function.is-dir]: open_basedir restriction in effect”

  1. Can you be fascinated on a website link trading? Be kind to throw me a message.

Leave a Reply

Twitter Delicious Facebook Digg Stumbleupon Favorites More