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 私のデジタルライフフォーラム .です。
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へのストリームをHTTPリクエストを開くことができませんfopen関数またはにfsockopen
- Install XCache PHP Accelerator in Linux by Compiling from Source加速器にLinuxをインストールするxcache PHPのソースからコンパイルする
- WordPress MySQL SQL Query Error in WPDB Class WordPressのMySQLのSQLクエリにエラーが発生wpdbクラス
- gmmktime Error in WordPress and MagpieRSS gmmktimeにエラーが発生WordPressのとmagpierss
- Email Bounces Back with “unrouteable mail domain” Error電子メール直帰先頭に" unrouteableメールドメイン"エラーが発生
- Oracle Database Import Error 3113/3114 Oracleデータベースにインポートエラーが発生3114分の3113
- 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 、干し草国連artículo muy interesanteについて私のデジタルライフこのエラーが発生します。 Etiquetas: Desarrollo, hosting, open_basedir, [...]タグ: desarrollo 、ホスティングで、 open_basedir 、 [...]
December 21st, 2007 16:58 2007年12月21日16:58
Great article.素晴らしい記事です。
Thanks for the WHM tip.ヒントwhmてくれてありがとう。
You saved my ass.私のお尻を保存します。