Files
tripz-llc/docker/php/php-prod.ini
T
2026-08-09 16:56:13 +03:00

38 lines
1.8 KiB
INI
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
; ============================================================
; إعدادات PHP للإنتاج — تُركَّب على كل حاويات fpm
; ============================================================
;
; ‏صورة php الرسمية لا تشحن php.ini إطلاقاً (تترك php.ini-production
; ‏و php.ini-development جانباً بلا تفعيل)، فتسري قيم PHP المدمجة:
; ‏display_errors مُفعّل. أي أن كل تحذير أو إشعار يُطبع **داخل جسم
; ‏الردّ** قبل الـ JSON.
;
; ‏وهذا ليس تنظيراً: شاشة رصيد الكابتن كانت تسقط بـ
; ‏"FormatException: Unexpected character (at character 1) <br />"
; ‏لأن getAllPayment.php أخرج تحذيراً قبل الـ JSON فصار الردّ غير قابل
; ‏للتحليل. العطل يبدو في التطبيق بينما مصدره سطر تحذير في PHP.
;
; ‏والأسوأ أمنياً: نص التحذير يحمل المسار المطلق للملف وأحياناً جزءاً من
; ‏الاستعلام — يُسلَّم للعميل مباشرة.
;
; ‏القاعدة: تُسجَّل الأخطاء ولا تُعرض. www-pool.conf يوجّه error_log إلى
; ‏مخرج الحاوية، فتُقرأ بـ `docker compose logs php`.
display_errors = Off
display_startup_errors = Off
log_errors = On
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
; ‏لا تكشف نسخة PHP في ترويسة X-Powered-By.
expose_php = Off
; ‏رفع صور المستندات (رخصة، هوية) — متوافق مع client_max_body_size 25m
; ‏في nginx. تركهما على الافتراضي (2m) كان يقطع رفع صور الكاميرا بصمت.
upload_max_filesize = 25M
post_max_size = 25M
max_execution_time = 60
memory_limit = 256M
date.timezone = UTC