عند محاولة تحميل شعار إلى الموضوع الفرعي Zen 3.1 (المظهر> الإعدادات) ، أتلقى الخطأ التالي:
Warning: is_file(): open_basedir restriction in effect. File(/tmp/phpillr69) is not within the allowed path(s): (/home/testwww/web/) in image_get_info() (line 126 of /home/testwww/web/informator/includes/image.inc).
Warning: realpath(): open_basedir restriction in effect. File(/tmp/phpillr69) is not within the allowed path(s): (/home/testwww/web/) in drupal_realpath() (line 2177 of /home/testwww/web/informator/includes/file.inc).
Warning: getimagesize(): Filename cannot be empty in image_Gd_get_info() (line 349 of /home/testwww/web/informator/modules/system/image.Gd.inc).
The specified file logo.gif could not be uploaded. Only JPEG, PNG and GIF images are allowed.
يحدث ذلك على الرغم من أن لدي المسارات في التكوين> الوسائط> تعيين نظام الملفات ليكون داخل جذر الويب.
يبدو أن Drupal يحاول حفظ ملف مؤقت في/tmp/على الرغم من تعيين الدليل المؤقت على شيء مختلف.
كيف يمكنني إصلاح المشكلة حتى أتمكن من تحميل ملف؟
المفتاح هنا هو أن PHP يحاول إنشاء ملف مؤقت في دليل عام. إذا أشرت إلى إعدادات PHP ، اكتشف ما تم تحديده لـ 'upload_tmp_dir'. استخدم استدعاء phpinfo () لعرض هذا ، وهو متاح أيضًا في تقرير الحالة بالنقر فوق PHP رقم الإصدار. يحتوي هذا الدليل على امتيازات خاصة لن يحظرها open_basedir. اضبط drupal دليل مؤقت على هذا المسار بشكل صريح ويجب أن يعمل.