PHP Scripts open_basedir Restriction in Effect Error PHP Script open_basedir Restriction quả trong Lỗi

PHP open_basedir protection tweak is a Safe Mode security measure that prevents users from opening files or scripts located outside of their home directory with PHP, unless the folder has specifically excluded. PHP open_basedir bảo vệ tweak Chế độ an toàn là một biện pháp an ninh rằng ngăn cản người sử dụng từ các tập tin hoặc mở tập lệnh nằm ở bên ngoài nhà của họ với các thư mục PHP, trừ khi các thư mục đã bị loại trừ. PHP open_basedir setting if enabled, will ensure that all file operations to be limited to files under certain directory, and thus prevent php scripts for a particular user from accessing files in unauthorized user's account. PHP open_basedir cài đặt, nếu được kích hoạt, sẽ đảm bảo rằng tất cả các tập tin hoạt động sẽ được giới hạn đối với một số tập tin theo thư mục, và do đó ngăn ngừa php script cho một người dùng truy cập các tập tin trong tài khoản của người sử dụng trái phép. When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. Khi một tập lệnh cố gắng mở một tập tin với, ví dụ, fopen () hay gzopen (), vị trí của tập tin sẽ được kiểm tra. When the file is outside the specified or permissible directory-tree, PHP will refuse to open it and the following errors may occur: Khi các tập tin bên ngoài được chỉ định hoặc thư mục-permissible cây, PHP sẽ từ chối để mở nó và sau đây có thể có lỗi:

Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. Cảnh báo: file_exists () [function.file-exists]: open_basedir hạn chế có hiệu lực. File(/home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg) is not within the allowed path(s): (/home/user_name:/usr/lib/php:/usr/local/lib/php:/tmp) in /home/user_name/public_html/wp-admin/inline-uploading.php on line 226 Tập tin (/ home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg) không phải là trong phạm vi cho phép con đường (s): (/ home / USER_NAME: / usr / lib / php: / usr / local / lib / php: / tmp) in / home / USER_NAME / public_html / wp-admin / inline-uploading.php on line 226

The above error message appears on a Apache httpd web server error log (error_log) hosting Wordpress blog. Trên thông báo lỗi sẽ xuất hiện trên một máy chủ web Apache httpd lỗi đăng nhập (error_log) lưu trữ Wordpress blog. However, the problem may happen to all system or websites that use PHP as scripting language. Tuy nhiên, vấn đề xảy ra tháng năm cho tất cả các hệ thống hoặc các trang web sử dụng ngôn ngữ PHP là scripting.

The solution or workaround to open_basedir restriction problem is that disable the PHP open_basedir protection altogether, or to exclude the protection for certain privileged user accounts, or to allow access to the additional directory for PHP scripts. Các giải pháp hoặc workaround để open_basedir hạn chế vấn đề này là vô hiệu hoá PHP open_basedir altogether bảo vệ, hoặc để loại trừ việc bảo vệ đối với một số đặc quyền tài khoản người dùng, hoặc để cho phép truy cập vào các thư mục cho các PHP script.

If you're using cPanel WebHost Manager (WHM), you can easily disable PHP open_basedir protection or exclude certain users from the protection with WHM. Nếu bạn đang sử dụng cPanel WebHost Manager (WHM), bạn có thể dễ dàng vô hiệu hóa PHP open_basedir bảo vệ hoặc loại trừ một số người sử dụng từ việc bảo vệ với WHM. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. Đơn giản chỉ cần đến "Tweak Bảo mật" dưới sự "bảo vệ" phần, sau đó chọn "Cấu hình" liên kết cho "Php open_basedir Tweak". Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection. Bên trong nó, bạn có thể kích hoạt hoặc vô hiệu php open_basedir bảo vệ, hoặc loại bỏ và bao gồm từ việc bảo vệ máy.

If you're using Plesk hosting control panel, you may need to manually edit Apache configuration file of vhost.conf and vhost_ssl.conf, and add in or edit the following php_admin_value open_basedir lines to the following: Nếu bạn đang sử dụng Plesk lưu trữ bảng điều khiển, bạn có thể cần phải tự sửa đổi tập tin cấu hình của Apache vhost.conf và vhost_ssl.conf, và thêm vào hoặc chỉnh sửa sau php_admin_value open_basedir dòng để những điều sau đây:

<Directory /full/path/to/the/directory/httpdocs> <Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir none php_admin_value open_basedir không có gì
</Directory> </ Directory>

<Directory /full/path/to/the/directory/httpdocs> <Directory /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir /full/path/to/dir:/full/path/to/directory/httpdocs:/tmp php_admin_value open_basedir / full / path / to / dir: / đầy đủ / path / to / thư mục / httpdocs: / tmp
</Directory> </ Directory>

Note: For SSL hosts in the vhost_ssl.conf file, the Directory path will end with “httpsdocs” instead of “httpdocs”. Lưu ý: Đối với SSL máy vhost_ssl.conf trong các tập tin, thư mục con đường sẽ kết thúc với "httpsdocs" thay vì "httpdocs".

The paths (above is example only and to be replaced with real path) that behind open_basedir are the directories that specifically allowed for the PHP scripts in the vhost domain account to access, so you can add in more directories that files are been stored and needed to be opened by PHP, each seperated by color “:”. Các đường dẫn (chỉ có ở trên là ví dụ và sẽ được thay thế bằng con đường thực tế) mà đằng sau open_basedir là các thư mục, mà cụ thể được cho phép đối với PHP script trong vhost tên miền để truy cập vào tài khoản, do đó, bạn có thể thêm vào nhiều thư mục, trong đó có các tập tin được lưu trữ và cần thiết để được mở của PHP, mỗi ly thân của màu sắc ":". But be careful as it might expose your system to security fraud. Nhưng phải cẩn thận vì nó có thể phơi ra hệ thống của bạn để bảo vệ gian lận.

Once done, run the command below to make the changes effective, and then restart Apache httpd web server (apache2ctl restart or httpd restart): Sau khi thực hiện, hãy chạy lệnh dưới đây để thực hiện những thay đổi có hiệu quả, và sau đó khởi động lại Apache httpd web server (apache2ctl khởi động lại hoặc khởi động lại httpd):

$PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a $ PRODUCT_ROOT_D / admin / sbin / websrvmng-v-a

If you have to manually edit the Apache configuration file to disable PHP open_basedir protection, simply open up the httpd.conf file, and search for the lines that starts with the following characters: Nếu bạn có, để tự chỉnh sửa các tập tin cấu hình của Apache để vô hiệu hoá PHP open_basedir bảo vệ, chỉ cần mở các tập tin httpd.conf, và tìm kiếm cho rằng những dòng bắt đầu bằng các ký tự sau:

php_admin_value open_basedir ….. php_admin_value open_basedir ... ..

Replace the whole line under the virtual host for the domain user account that you want to disable protection with the following line to disable it: Thay thế toàn bộ dòng theo ảo cho các máy chủ tên miền tài khoản người dùng mà bạn muốn vô hiệu hoá tính năng bảo vệ với các dòng sau để vô hiệu hóa nó:

php_admin_value open_basedir none php_admin_value open_basedir không có gì

You can also opt to allow your PHP scripts to access additional directory instead without disabling the protection. Bạn cũng có thể lựa chọn không cho phép PHP script của bạn để truy cập vào các thư mục để thay thế mà không vô hiệu hoá việc bảo vệ. Additional directory can be added to the line, separated with color “:”. Các thư mục có thể được thêm vào dòng, tách biệt với màu sắc ":". For example, to add /new_directory to the allow list: Ví dụ, để thêm / new_directory vào danh sách cho phép:

php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp” php_admin_value open_basedir "/ home / user_account /: / usr / lib / php: / usr / local / lib / php: / tmp"

php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp:/new_directory” php_admin_value open_basedir "/ home / user_account /: / usr / lib / php: / usr / local / lib / php: / tmp: / new_directory"

Restart the Apache after finished editing. Khởi động lại Apache sau khi hoàn tất chỉnh sửa. Note that the directory allowed list restriction above is actually a prefix, not a directory name. Lưu ý rằng các thư mục được cho phép trong danh sách hạn chế nêu trên thật là một tiền tố, không phải là một thư mục tên. This means that “open_basedir = /dir/incl” also allows access to “/dir/include” and “/dir/incls” if they exist. Điều này có nghĩa là "open_basedir = / dir / bao gồm" cũng cho phép truy cập vào "/ dir / bao gồm" và "/ dir / incls" nếu chúng tồn tại. When you want to restrict access to only the specified directory, end with a slash. Khi bạn muốn hạn chế quyền truy cập vào các thư mục được chỉ định, kết thúc bằng một slash. For example: “open_basedir = /dir/incl/”. Ví dụ: "open_basedir = / dir / bao gồm /".

IMPORTANT : The page is machine translated and provided "as is" without warranty. Lưu ý: Các trang web là máy tính dịch và cung cấp "như là" mà không có bảo hành. Machine translation may be difficult to understand. Máy dịch thuật có thể là khó hiểu. Please refer to Xin vui lòng tham khảo original English article Tiếng Anh bản gốc bài viết whenever possible. bất cứ khi nào có thể.


2 Responses to “PHP Scripts open_basedir Restriction in Effect Error” 2 hồi đáp tới "PHP Script open_basedir trong Restriction Effect Lỗi"

  1. Amateur Dating Club Hẹn hò amateur Câu lạc bộ
    December 21st, 2007 16:58 21 tháng mười hai, 2007 16:58
    2 2

    Great article. Great article.
    Thanks for the WHM tip. Thanks for the tip WHM.

    You saved my ass. Bạn lưu my ass.

  2. Error open_basedir restriction in effect en Agamum.net Lỗi open_basedir hạn chế có hiệu lực trong Agamum.net
    December 3rd, 2007 16:21 3 tháng mười hai, 2007 16:21
    1 1

    [...] queréis más información sobre este tema, hay un artículo muy interesante sobre este error en My Digital Life. [...] Queréis thêm nữa thông tin vê este Tema, hay un artículo muy interesante sobre este lỗi vi kỹ thuật số Cuộc sống của tôi. Etiquetas: Desarrollo, hosting, open_basedir, [...] Etiquetas: Desarrollo, lưu trữ, open_basedir, [...]

Leave a Reply Để lại một trả lời

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> Bạn có thể sử dụng các thẻ:<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime = ""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. Đăng ký nhận xét tính năng đã bị vô hiệu hoá. To receive notification of latest comments posted, subscribe to Để nhận được thông báo về ý kiến mới nhất được đăng, đăng ký với My Digital Life Comments RSS feed Cuộc sống kỹ thuật số Bình luận của tôi nguồn cấp dữ liệu RSS or hoặc register to receive đăng ký để nhận được new comments in daily email digest. Các ý kiến mới trong thư điện tử tiêu hàng ngày.
Custom Search

New Articles Bài viết mới

Incoming Search Terms for the Article Tìm kiếm các điều khoản cho các Điều

open_basedir restriction in effect open_basedir hạn chế có hiệu lực - -- open_basedir restriction in effect. open_basedir hạn chế có hiệu lực. - -- php open_basedir restriction in effect php open_basedir hạn chế có hiệu lực - -- apache open_basedir apache open_basedir - -- wordpress open_basedir restriction in effect wordpress open_basedir hạn chế có hiệu lực - -- open_basedir restriction open_basedir hạn chế - -- open_basedir restriction in effect wordpress open_basedir hạn chế có hiệu lực wordpress - -- open_basedir apache open_basedir apache - -- open_basedir restriction in effect. open_basedir hạn chế có hiệu lực. - -- php open_basedir restriction php open_basedir hạn chế - -- php open_basedir php open_basedir - -- wordpress open_basedir restriction in effect. wordpress open_basedir hạn chế có hiệu lực. - -- cpanel open_basedir cPanel open_basedir - -- open_basedir restriction in effect php open_basedir php hạn chế có hiệu lực - -- open_basedir restriction in effec open_basedir hạn chế trong effec - -- "open_basedir restriction in effect" "open_basedir hạn chế có hiệu lực" - -- open_basedir example open_basedir ví dụ - -- open_basedir restriction in effect open_basedir hạn chế có hiệu lực - -- php open_basedir restrictions php open_basedir hạn chế - -- whm open_basedir whm open_basedir - -- wordpress Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. wordpress Cảnh báo: file_exists () [function.file-exists]: open_basedir hạn chế có hiệu lực. - -- open_basedir restriction in effect. open_basedir hạn chế có hiệu lực. wordpress wordpress - -- open_basedir restriction wordpress open_basedir hạn chế wordpress - -- php apache open_basedir php apache open_basedir - -- wordpress open_basedir restriction wordpress open_basedir hạn chế - -- cpanel open_basedir restriction in effect cPanel open_basedir hạn chế có hiệu lực - -- "open_basedir restriction" "open_basedir hạn chế" - -- apache openbase_dir apache openbase_dir - -- wordpress 2.8 open_basedir restriction in effect wordpress 2,8 open_basedir hạn chế có hiệu lực - -- wordpress warning file_exists function.file-exists open_basedir restriction in effect. wordpress cảnh báo file_exists function.file-open_basedir tồn tại hạn chế có hiệu lực. - -- php_admin_value open_basedir php_admin_value open_basedir - -- wordpress permalink open_basedir restriction in effect. wordpress Permalink open_basedir hạn chế có hiệu lực. - -- disable open_basedir whm vô hiệu hóa open_basedir whm - -- php open basedir restriction in effect php mở basedir hạn chế có hiệu lực - -- plesk php include path plesk php bao gồm các đường dẫn - -- all tất cả - -- open_basedir restriction in effect apache open_basedir hạn chế có hiệu lực apache - -- php open_basedir restriction php open_basedir hạn chế - -- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. Cảnh báo: file_exists () [function.file-exists]: open_basedir hạn chế có hiệu lực. Wordpress Wordpress - -- Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. Cảnh báo: file_exists () [function.file-exists]: open_basedir hạn chế có hiệu lực. File wordpress erro Wordpress file erro - -- open_basedir restrictions are in effect open_basedir được hạn chế có hiệu lực - -- open_basedir restriction in effect disable open_basedir hạn chế có hiệu lực vô hiệu hoá - -- "open_basedir restriction in effect" wordpress "open_basedir hạn chế có hiệu lực" wordpress - -- disable open_basedir vô hiệu hóa open_basedir - -- open_basedir is in effect open_basedir là có hiệu lực - -- open_basedir cpanel open_basedir cPanel - -- open_basedir add directory open_basedir thêm vào thư mục - -- php_admin_value open_basedir php_admin_value open_basedir - -- wordpress Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. wordpress Cảnh báo: file_exists () [function.file-exists]: open_basedir hạn chế có hiệu lực. - -- open_basedir+whm open_basedir + whm - --