PHP Scripts open_basedir Restriction in Effect Error php 스크립트를 open_basedir 제한 효과 오류
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 보호 안전 모드로 조정 보안 조치가 개방을 방해하는 사용자의 홈 디렉토리의 파일이나 스크립트와 php 지역에 거주하지 않는 한 폴더가 구체적으로 배제합니다. 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 설정을 활성화된 경우는 모든 파일 작업을 수행할 수 있도록 특정 디렉토리 아래의 파일이 제한되어 있으며, 따라서 php 스크립트를 방지하기 위해 사용자가 특정 사용자의 계정을 무단으로 파일에 액세스하지 못하합니다. When a script tries to open a file with, for example, fopen() or gzopen(), the location of the file is checked. 파일을 열려고하면 스크립트를 예를 들면, fopen ()이나 gzopen (), 파일의 위치를 확인합니다. When the file is outside the specified or permissible directory-tree, PHP will refuse to open it and the following errors may occur: 이 파일은 허용되는 경우 이외의 지정하거나 디렉토리 - 나무, php가를 거부하는 열어 다음과 같은 내용의 오류가 발생할 수있습니다 :
Warning: file_exists() [function.file-exists]: open_basedir restriction in effect. 경고 : file_exists () [function.file - 존재] : open_basedir 제한에 적용합니다. 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 파일 (/ home/user_name/public_html/wp-content/uploads/2006/12/picture.jpg)은 통행을 허용 (들) : (/ 홈 / 사용자 : / usr / lib / php : / usr / 지방 / lib / php : / tmp)에 / 홈 / 사용자 / public_html / 백린 - 관리 / 인라인 - uploading.php 행에 226
The above error message appears on a Apache httpd web server error log (error_log) hosting Wordpress blog. 위의 오류 메시지가 나타납니다 아파치 웹서버가 웹 서버에 오류 로그 (error_log) wordpress 블로그를 호스팅합니다. However, the problem may happen to all system or websites that use PHP as scripting language. 그러나 문제 또는 웹 사이트를 사용하는 모든 시스템에 문제가 발생할 수있습니다 php로 스크립팅 언어합니다.
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. open_basedir 규제를 해결하려면 문제를 해결하거나 해제하는 php open_basedir 없음을 모두가, 아니면 특정 권한이 사용자 계정의 보호를 제외하거나 추가로 디렉토리를 php 스크립트에 대한 액세스를 허용합니다.
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. cpanel 웹 호스트를 사용하는 경우 관리자 (whm), 쉽게 사용하실 수있습니다 php open_basedir 보호하거나 특정 사용자의 보호를 whm를 제외합니다. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. 단순히 이동을 "조정 보안"아래에 "보안"섹션을 선택한 후 "설정"링크에서 "php open_basedir 조정"합니다. Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection. 그안에 들어하거나 사용하지 않도록 설정할 수있습니다 php open_basedir 제한 없음, 또는 호스트를 포함 및 제외를 보호합니다.
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: plesk 호스팅을 사용하는 경우 제어판을 수동으로 편집해야 할 수도있습니다 아파치 환경 설정 파일을 vhost.conf 및 vhost_ssl.conf, 그리고 다음과 같은 php_admin_value open_basedir 라인에서 추가하거나 수정하려면 다음 :
<Directory /full/path/to/the/directory/httpdocs> <디렉토리 /full/path/to/the/directory/httpdocs>
php_admin_value open_basedir none php_admin_value open_basedir 없음
</Directory> </ 디렉토리>
<Directory /full/path/to/the/directory/httpdocs> <디렉토리 /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 / 전체 / 경로 /로 / dir : / 전체 / 경로 /로 / 디렉토리 / httpdocs : / tmp
</Directory> </ 디렉토리>
Note: For SSL hosts in the vhost_ssl.conf file, the Directory path will end with “httpsdocs” instead of “httpdocs”. 참고 사항 : 호스트에 vhost_ssl.conf을 선택 파일의 디렉토리 경로는 조만간 끝날 것 "httpsdocs"대신 "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 “:”. 의 경로 (위는 예제로만 제공되며 실제 경로로 교체가)가 배후 open_basedir이있는 디렉토리를 php 스크립트를 허용을 구체적으로 도메인 계정에 액세스 vhost, 그래서 더 많은 디렉토리에있는 파일을 추가할 수있습니다가가 필요로 저장하고 를 개설하여 php, 각 구분하여 색상 ":". But be careful as it might expose your system to security fraud. 하지만 조심하여 시스템을 보안을 사기에 노출 수도있습니다.
Once done, run the command below to make the changes effective, and then restart Apache httpd web server (apache2ctl restart or httpd restart): 일단 완료되면 아래 명령을 실행하여 변경 사항을 효과적인지, 그리고 아파치 웹서버를 다시 시작합니다 웹 서버 (apache2ctl 웹서버를 다시 시작하거나 다시 시작합니다) :
$PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a $ product_root_d / 관리 / sbin / websrvmng - 승 -
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: 아파치 환경 설정을 수정해야하는 경우 파일을 수동으로 해제 php open_basedir 보호, 간단하게 열 수있는 httpd.conf 파일을 찾기 위해 다음과 같은 문자로 시작하는 선 :
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: 전체 라인 교체합니다 가상 호스트의 도메인 아래에 사용자 계정을 보호하고자하는 다음과 같은 라인을 사용하지 않도록 설정을 해제 :
php_admin_value open_basedir none php_admin_value open_basedir 없음
You can also opt to allow your PHP scripts to access additional directory instead without disabling the protection. 귀하의 php 스크립트를 선택할 수도있습니다에 접근을 허용하지 않고 대신에 추가로 디렉토리의 보호를 해제합니다. Additional directory can be added to the line, separated with color “:”. 관련 디렉토리에 추가될 수있습니다 라인, 이산과 색상 ":". For example, to add /new_directory to the allow list: 예를 들어, 추가 / new_directory을 허용 목록 :
php_admin_value open_basedir “/home/user_account/:/usr/lib/php:/usr/local/lib/php:/tmp” php_admin_value open_basedir "/ 홈 / user_account / : / usr / lib / php : / usr / 지방 / 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 "/ 홈 / user_account / : / usr / lib / php : / usr / 지방 / lib / php : / tmp : / new_directory"
Restart the Apache after finished editing. 편집 완료 후 아파치를 다시 시작합니다. Note that the directory allowed list restriction above is actually a prefix, not a directory name. 참고로 위의 디렉토리 허용 목록 제한은 실질적으로 프리 픽스가 아닌 디렉토리 이름. This means that “open_basedir = /dir/incl” also allows access to “/dir/include” and “/dir/incls” if they exist. 이 말의 의미는 "open_basedir = / dir / 포함"을 구입에 대한 액세스를 허용 "/ dir / 포함"와 "/ dir / incls"만일 그들이 존재합니다. When you want to restrict access to only the specified directory, end with a slash. 대한 액세스를 제한하려는 경우에만 지정된 디렉토리, 슬래쉬로합니다. For example: “open_basedir = /dir/incl/”. 예를 들어 : "open_basedir = / dir / 포함 /".
IMPORTANT : This is a machine translated page which is provided "as is" without warranty. 중요 사항 : 이것은 기계 번역 페이지는 "있는 그대로"제공하지 않고 보증합니다. Machine translation may be difficult to understand. 기계 번역을 이해하기 어려울 수있습니다. Please refer to 를 참조하시기 바랍니다 original English article 원래 영어 자료 whenever possible. 언제 수있습니다.
Share and contribute or get technical support and help at 를 공유하고 기술 지원 및 도움을 공헌하지 않는다면 My Digital Life Forums 내 디지털 라이프 공개 토론 . 합니다.
Related Articles 관련 기사
- PHP Parse Error: syntax error, unexpected $end php 구문 분석 오류 : 구문 오류가 발생, 예상치 못한 $ 끝
- PHP Allowed Memory Size Exchausted Fatal Error php 허용 메모리 크기 exchausted 치명적인 오류
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions php 5 요청 스트림을 열 수없습니다 또는 fsockopen 함수와 fopen
- Install XCache PHP Accelerator in Linux by Compiling from Source 리눅스에서 xcache php 액셀 러레이터를 설치하여 소스에서 컴파일하기
- WordPress MySQL SQL Query Error in WPDB Class wpdb 클래스에 오류가 mysql sql 쿼리를 wordpress
- gmmktime Error in WordPress and MagpieRSS wordpress와 magpierss gmmktime에 오류가
- Email Bounces Back with “unrouteable mail domain” Error 전자 우편 반송 위로에 "unrouteable 메일 도메인"라는 오류
- Oracle Database Import Error 3113/3114 오라클 데이터베이스를 수입 오류 3,114분의 3,113
- RapidLeech v2.2 Free Download 무료로 다운로드 rapidleech v2.2
- How to Customize, Modify or Change WordPress Database Connection Error Page 을 사용자 지정하는 방법, 수정 또는 변경 wordpress 데이터베이스 연결 오류 페이지를



















December 3rd, 2007 16:21 2007년 12월 3일 16:21
[...] queréis más información sobre este tema, hay un artículo muy interesante sobre este error en My Digital Life. 이 주제에 관한 더 많은 정보를 [...] queréis, 건초 유엔 기사에 관하여 아주 interesante 내 디지털 생활이 오류가 발생했습니다. Etiquetas: Desarrollo, hosting, open_basedir, [...] 태그 : 토플, 호스팅, open_basedir, [...]
December 21st, 2007 16:58 2007년 12월 21일 16:58
Great article. 좋은 기사.
Thanks for the WHM tip. whm 팁 주셔서 감사합니다.
You saved my ass. 내 엉덩이를 저장합니다.