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など)を/ home /ユーザー名/ public_htmlと/ WPの管理者/ uploading.php上の行にインライン- 226

The above error message appears on a Apache httpd web server error log (error_log) hosting Wordpress blog.上記のエラーメッセージが表示さに表示されてウェブサーバーのhttpdをApacheのエラーログ( error_logに)ホスティングWordPressのブログです。 However, the problem may happen to all system or websites that use PHP as scripting language.しかし、 5月に発生するすべてのシステムの問題やウェブサイトスクリプティング言語として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ホスティングする必要がありますApacheの設定ファイルを手動で編集するの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の/フル/パス/を/ディレクトリ: /フル/パス/を/ディレクトリ/ httpdocs : / tmpの
</Directory> < /ディレクトリ>

Note: For SSL hosts in the vhost_ssl.conf file, the Directory path will end with “httpsdocs” instead of “httpdocs”.注: SSLのホストは、 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の明確な許可をvhost PHPスクリプトは、ドメインアカウントにアクセスするので、他のディレクトリを追加することもできますし、必要に応じて格納されたファイルは、 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):一度完了すると、以下のコマンドを実行して効果的なの変化を、コンピュータを再起動ApacheのWebサーバーのhttpd ( apache2ctlのhttpd再起動または再起動) :

$PRODUCT_ROOT_D/admin/sbin/websrvmng -v -a $ product_root_d /管理/ sbin / websrvmng - v - 、

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:手動で編集する必要がある場合にApacheの設定ファイルを無効に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 / 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の" /ホーム/ user_account / :は/ usr / lib / phpの: / usr / local / libにまた/ php : / tmpの: / new_directory "

Restart the Apache after finished editing.終了後にApacheを再起動して編集します。 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 = /ディレクトリ/ incl "とものアクセスを許可すると" / dir / include "と" / 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 = /ディレクトリ/付き/ " 。

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 私のデジタルライフフォーラム .です。



2 Responses to “PHP Scripts open_basedir Restriction in Effect Error” 2つの応答を" PHPスクリプトエラーが発生open_basedirの効果の制限"

  1. Error open_basedir restriction in effect en Agamum.netエラーが発生open_basedirの制限に効果アンagamum.net
    December 3rd, 2007 16:21 2007年12月3日16:21
    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 、干し草国連artículo muy interesanteについて私のデジタルライフこのエラーが発生します。 Etiquetas: Desarrollo, hosting, open_basedir, [...]タグ: desarrollo 、ホスティングで、 open_basedir 、 [...]

  2. Amateur Dating Clubアマチュアのデートクラブ
    December 21st, 2007 16:58 2007年12月21日16:58
    2

    Great article.素晴らしい記事です。
    Thanks for the WHM tip.ヒントwhmてくれてありがとう。

    You saved my ass.私のお尻を保存します。

Leave a Reply残して返信

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> これらのタグを使用することができます: <aのhref=のtitle= <abbrのtitle= <blockquote cite=""> <cite> <acronymのtitle= <b>ダウンロードの<code> <デル日時= " " >の<em> <i>て<strike> <strong> <q cite="">

Subscribe without commenting登録なしのコメント


Custom Search

New Articles新しい記事

Incoming Search Terms for the Article検索用語を受信するには

open_basedir restriction in effect open_basedirの制限に効果 - - open_basedir restriction in effect. open_basedirの制限を有効にします。 - - open_basedir restriction open_basedirの制限 - - "open_basedir restriction in effect" " open_basedirの制限の効果" - - php_admin_value open_basedir php_admin_value open_basedirの - - php open_basedir PHPのopen_basedirの - - apache open_basedir Apacheのopen_basedirの - - open_basedir restriction in effect. open_basedirの制限を有効にします。 - - open_basedir restriction open_basedirの制限 - - open_basedir disable open_basedirを無効に - - open_basedir php open_basedirのPHPの - - wordpress open_basedir WordPressのopen_basedirの - - wordpress open_basedir restriction in effect WordPressのopen_basedirの制限に効果 - - php open_basedir restriction PHPのopen_basedirの制限 - - php open_basedir restriction in effect PHPのopen_basedirの制限に効果 - - disable open_basedir open_basedirを無効に - - Plesk open_basedir restriction in effect. のPlesk open_basedirの制限を有効にします。 - - open_basedir restriction in effec open_basedirの制限が効果的 - - open_basedir open_basedirの - - "open_basedir restriction in effect." " open_basedirの制限を有効にします。 " - - open_basedir restriction in effect open_basedirの制限に効果 - - php open_basedir plesk PHPのopen_basedirののPlesk - - php_admin_value open_basedir php_admin_value open_basedirの - - plesk open_basedir restriction in effect open_basedirの制限に効果のPlesk - - open_basedir wordpress open_basedirのWordPressの - - open_basedir restriction in effect cpanel open_basedirの制限に効果cpanel - - open_basedir restriction in effect open_basedirの制限に効果 - - php_admin_value open_basedir none php_admin_value open_basedirをなし - - open_basedir restriction in effect plesk open_basedirの制限に効果のPlesk - - Tweak PHP open_basedir Security 微調整PHPのopen_basedirの安全保障 - - open_basedir restriction plesk open_basedirの制限のPlesk - - plesk disable open_basedir open_basedirの無効のPlesk - - plesk php open_basedir のPlesk PHPのopen_basedirの - - cPanel open_basedir restriction in effect cpanel open_basedirの制限に効果 - - remove open_basedir open_basedirの削除 - - fix open_basedir restriction in effect error config file 修正プログラムの効果open_basedirのエラーが発生configファイルの制限 - - apache open_basedir restriction in effect. Apacheのopen_basedirの制限を有効にします。 - - PHP open_basedir Protection PHPのopen_basedirの保護 - - plesk jaring jaringのPlesk - - open_basedir restriction in effect include open_basedirの制限が含まれて効果 - - cPanel open_basedir open_basedirのcpanel - - disable open_basedir restriction in effect. open_basedirの制限の効果を無効にします。 - - cpanel disable open_basedir open_basedirを無効にcpanel - - php_admin_value errors php_admin_valueエラー - - plesk php_admin_value php_admin_valueのPlesk - - how to remove open_basedir restriction open_basedirの制限を削除する方法 - - How do I enable error logging for PHP scripts? どうすればよいのエラーログ記録を有効にするPHPスクリプトですか? - - php open_basedir PHPのopen_basedirの - - KB951748 plesk kb951748のPlesk - - plesk php openbasedir PHPのopenbasedirのPlesk - -