ขอความช่วยเหลือค่ะ

สำหรับผู้ที่ เริ่มต้น Programming - PHP มีอะไร แนะนำ หรือข้อสงสัยต้องบอร์ด นี้ คนที่มีความรู้ แบ่งปันคนอื่นบ้างนะ ปัญหาการเขียนโปรแกรม แบบ OOP Session Cookies php network

Moderators: mindphp, ผู้ดูแลกระดาน

zana
PHP Newbie
PHP Newbie
Posts: 1
Joined: 08/09/2008 8:38 pm

ขอความช่วยเหลือค่ะ

Post by zana » 08/09/2008 8:42 pm

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(/usr/share/pear/./templates/tmpl1//./templates/tmpl1/index.tpl.html) is not within the allowed path(s): (/home/www/virtual/worksiness.com/model2/:/usr/share/php:/tmp) in /home/www/virtual/worksiness.com/model2/htdocs/smarty/core/core.get_include_path.php on line 34

Search:
Example: admin password

Help Center » Installation & Configuration »

Why do I get the following error message: "Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. File(...) is not within the allowed path(s):..."?

This error message indicates that the path to your home directory is not included in allowed paths specified by open_basedir parameter in php.ini file. open_basedir limits the files that can be opened by PHP to the specified directory and all included subdirectories. Thus, PHP script is trying to read a file which is not found in the specified path and the error occurs.

One way to solve the problem is to include your home directory path in the path list that PHP is allowed to open, specified by open_basedir. For example, the following setting indicates that PHP script can read files located in /home/vhosts, /usr/share/php/pear/ and /tmp folders:

open_basedir =/home/vhosts:/usr/share/php/pear/:/tmp

Another solution is to disable open_basedir restriction and allow open access to all directories. By default all files are allowed to be opened by PHP script.

You can add the above mentioned changes in your php.ini file (if you are running Shop-Script on your local computer) or contact your server hosting provider for support.

You can read more about open_basedir usage and syntaxes in PHP Manual.

แล้วต้องเข้าไปแก้ยังไงอ่ะค่ะ
ขอบคุณค่ะ

User avatar
mindphp
ผู้ดูแลระบบ MindPHP
ผู้ดูแลระบบ MindPHP
Posts: 23125
Joined: 22/09/2008 6:18 pm
Contact:

Re: ขอความช่วยเหลือค่ะ

Post by mindphp » 08/09/2008 10:00 pm

จะแก้ไข อะไรครับ
ติดตาม VDO: http://www.youtube.com/c/MindphpVideoman
ติดตาม FB: https://www.facebook.com/pages/MindphpC ... 9517401606
หมวดแชร์ความรู้: https://www.mindphp.com/forums/viewforum.php?f=29
รับอบรม และพัฒนาระบบ: https://www.mindphp.com/forums/viewtopic.php?f=6&t=2042

Post Reply

Return to “Programming - PHP”

Who is online

Users browsing this forum: saravana and 23 guests