PHP Scripts open_basedir Restriction in Effect Error بي. اتش. بى مخطوطات 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. بي. اتش. بى open_basedir حمايه القرص هو الوضع الامن تدبير امني ان يمنع المستخدمين من فتح الملفات او لغات برمجة الواقعة خارج وطنهم مع دليل بي. اتش. بى ، ما لم تكن مستبعده على وجه التحديد قد مجلد. 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. بي. اتش. بى open_basedir تحديد إذا مكن ، ضمان أن تكون جميع عمليات الملف الى ان يقتصر على بعض الملفات دليل ، وبالتالي منع بي. اتش. بى مخطوطات لمستخدم معين من الوصول الى الملفات غير المأذون به في حساب المستخدم. 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: عندما يكون الملف خارج المحددة المسموح بها دليل أو شجرة ، وسوف بي. اتش. بى ان ترفض فتح وانه قد تحدث الأخطاء التالية :
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) لا يسمح في إطار المسار (ق) : (/ الصفحه الرئيسية / USER_NAME : / usr / ليب / بي. اتش. بي : / usr / المحلية / ليب / بي. اتش. بي : / tmp) فى / الرئيسية / USER_NAME / public_html / رزمه العمل - الادارة / انلاين - uploading.php على الخط 226
The above error message appears on a Apache httpd web server error log (error_log) hosting Wordpress blog. رسالة الخطأ المذكورة اعلاه يبدو على خادم الويب اباتشي httpd سجل خطأ (error_log (استضافة بلوق WordPress. However, the problem may happen to all system or websites that use PHP as scripting language. ومع ذلك ، فان المشكلة يمكن ان يحدث للنظام او جميع المواقع التي تستخدم لغة برمجة كما بي. اتش. بى.
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 الى حل المشكلة هي ان تعطيل بي. اتش. بى open_basedir حمايه كليا ، او لاستبعاد بعض مميزة لحمايه حسابات المستخدمين ، او للسماح بالوصول الى دليل إضافية لالمخطوطات بي. اتش. بى.
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 webhost مدير (whm) ، يمكنك بسهولة تعطيل بي. اتش. بى open_basedir حمايه او استبعاد بعض المستخدمين من حمايه مع whm. Simply go to “Tweak Security” under the “Security” section, then select “Configure” link for “Php open_basedir Tweak”. ببساطة اذهب الى "القرص الامن الدوليين" في اطار "الامن" الباب ، ثم اختر "تكوين" وصلة "بي. اتش. بى open_basedir التعديل النهائي". Inside it, you can enable or disable php open_basedir Protection, or exclude and include hosts from the protection. في الداخل ، يمكنك تمكين او تعطيل بي. اتش. بى 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> <directory/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> <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 / الكامل / الطريق / / الى دير : / الكامل / الطريق / الى / الدليل / 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 هي أدلة على وجه التحديد ان يسمح للمخطوطات بي. اتش. بى خادم افتراضي في مجال الوصول الى الحساب ، ولذلك يمكنك اضافة المزيد من الادله في ان يتم تخزين الملفات وحاجة ان يفتتح بي. اتش. بى ، كل فصل حسب اللون ":". 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): مرة واحدة القيام به ، تديرها قيادة ادناه لاجراء تغييرات فعالة ، ثم قم باعادة تشغيل خادم الويب اباتشي httpd (apache2ctl اعادة تشغيل او اعادة تشغيل httpd) :
$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: اذا كان لديك يدويا لتحرير ملفات اباتشي لتعطيل بي. اتش. بى 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. يمكنك ايضا ان تختار السماح للمخطوطات بي. اتش. بى الخاص بك للوصول الى دليل اضافي وبدلا من تعطيل دون حمايه. 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 / ليب / بي. اتش. بي : / usr / المحلية / ليب / بي. اتش. بي : / 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 / ليب / بي. اتش. بي : / usr / المحلية / ليب / بي. اتش. بي : / 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 = / دير / يشمل" يتيح ايضا امكانيه الوصول الى "/ دير / تشمل" و "/ دير / 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 : You're reading a machine translated page which is provided "as is" without warranty. هام : انت إله قراءة الصفحه المترجمه التي تقدم "كما هى" دون ضمان. Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible. وخلافا للحقوق الترجمة ، والترجمة الاليه لا يفهم اللغة ، ودلاليه ، لغوي ، والتعابير من اللغة الطبيعيه ، وبالتالي تنتج في كثير من الاحيان غير دقيقة وذات نوعية منخفضه النص الذي مضلله وغير مفهوم. Thus, please refer to وهكذا ، يرجى الرجوع إلى original English article المادة الانكليزيه الاصليه whenever possible. كلما كان ذلك ممكنا.
MDL blog postings now continue at بالليات بلوق الآن في التعيينات Tip and Trick نصيحه والخديعه , and readers are welcome to join ، والقراء مدعوون الى الانضمام الى My Digital Life Forums بلدي الرقميه الحياة المنتديات .
Related Articles مقالات ذات صلة
- PHP Parse Error: syntax error, unexpected $end بي. اتش. بى خطأ تحليل : خطأ لغوي ، ونهاية غير متوقعة دولار
- PHP Allowed Memory Size Exchausted Fatal Error بي. اتش. بي الذاكرة الحجم المسموح exchausted خطأ فادح
- PHP 5 Unable to Open HTTP Request Stream with fopen or fsockopen Functions بي. اتش. بى 5 تعذر فتح بروتوكول انتقال النص المتشعب طلب fopen مع التيار fsockopen او وظائف
- Install XCache PHP Accelerator in Linux by Compiling from Source بي. اتش. بى تثبيت xcache مسرع في لينكس عن طريق تجميع من المصدر
- PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2 (Excerpt) بي. اتش. بى خطأ فادح على الدعوة الى add_query_var في taxonomy.php بعد الترقيه الى 2،5 WordPress rc2 (مقتطفات)
- gmmktime Error in WordPress and MagpieRSS gmmktime خطأ في WordPress وmagpierss
- WordPress MySQL SQL Query Error in WPDB Class WordPress الخلية لغة الاستعلامات البنيويه استفسار خطأ في الدرجة wpdb
- Email Bounces Back with “unrouteable mail domain” Error البريد الالكتروني القفزات مع عودة "unrouteable البريد النطاق" خطأ
- Oracle Database Import Error 3113/3114 خطا قاعدة البيانات أوراكل استيراد 3113/3114
- RapidLeech v2.2 Free Download Rapidleech v2.2 تحميل مجاني
December 3rd, 2007 16:21 كانون الاول / ديسمبر 3rd ، 2007 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 más información sobre است تيما ، تبن الامم المتحدة artículo muy interesante sobre است خطأ بلدي ان الحياة الرقميه. Etiquetas: Desarrollo, hosting, open_basedir, [...] Etiquetas : والتنمية ، واستضافه ، open_basedir ، [...]
December 21st, 2007 16:58 كانون الاول / ديسمبر 21st ، 2007 16:58
Great article. المادة كبيرة.
Thanks for the WHM tip. شكرا للنصيحه whm.
You saved my ass. انت انقذت مؤخرتي.