check-docker-php-config
Installation
Review the source and dependencies with a prompt. A package is available to download.
Install with an AI assistant
Copy the prompt so your assistant can review the pinned revision and dependencies first.
View promptHide prompt
Check whether SkillPI Skill Finder is installed for your current agent. If it is missing, install and enable it using the official instructions at https://github.com/Findskills/skillpi. Then use Skill Finder to locate and install "check-docker-php-config" from this exact SkillPI detail page: https://skillpi.com/skills/deepskill-277eddc3b82b486ab848422b3188b1cbd24480720c5e69fa7970e170bf9d35dc. Verify the upstream source and version against https://github.com/dykyi-roman/awesome-claude-code before installing. If they do not match, stop and report the mismatch. Report the installed path and source version.
Source and setup
github.com
Setup guidance pending
See the original source for supported tools, dependencies, and permissions.
Installation test pending
Check PHP configuration inside a Docker container. Validate php.ini settings, OPcache configuration, PHP-FPM pool settings, and extension configurations intended for production.
Introduction source: third_party · dykyi-roman · 0.0.1 Reference
SkillPi interpretation
- Tasks
- Checks PHP configuration in Docker containers. Verifies php.ini settings, OPcache, PHP-FPM pool, and extension configuration for production.
- Inputs and outputs
- ```markdown
- Testing
- Not tested
Browse files
Frontmatter
name: check-docker-php-config
description: Checks PHP configuration in Docker containers. Verifies php.ini settings, OPcache, PHP-FPM pool, and extension configuration for production.Docker PHP Configuration Checker
Analyze PHP configuration within Docker environments for production readiness.
Configuration Checks
1. php.ini Production vs Development
# BAD: Development config
RUN cp /usr/local/etc/php/php.ini-development /usr/local/etc/php/php.ini
# GOOD: Production config
RUN cp /usr/local/etc/php/php.ini-production /usr/local/etc/php/php.ini
2. OPcache Configuration
; GOOD: OPcache optimized for production
opcache.enable=1
opcache.memory_consumption=256
opcache.interned_strings_buffer=16
opcache.max_accelerated_files=20000
opcache.validate_timestamps=0
opcache.save_comments=1
3. OPcache JIT (PHP 8.4+)
opcache.jit=1255
opcache.jit_buffer_size=128M
4. PHP-FPM Pool Configuration
; BAD: Static pm wastes memory; ondemand has fork overhead
pm = static
pm.max_children = 100
; GOOD: Dynamic pm with tuned values
pm = dynamic
pm.max_children = 50
pm.start_servers = 10
pm.min_spare_servers = 5
pm.max_spare_servers = 20
pm.max_requests = 1000
5. Memory Limit
; BAD: Unlimited memory
memory_limit = -1
; GOOD: Appropriate for workload
memory_limit = 128M ; web
memory_limit = 256M ; workers
memory_limit = 512M ; batch
6. Error Reporting
; BAD: Development error display
display_errors = On
; GOOD: Production settings
display_errors = Off
display_startup_errors = Off
log_errors = On
error_log = /proc/self/fd/2
error_reporting = E_ALL & ~E_DEPRECATED & ~E_STRICT
7. Session Handling
; BAD: File-based sessions (not scalable)
session.save_handler = files
; GOOD: External storage
session.save_handler = redis
session.save_path = "tcp://redis:6379"
8. Upload Limits
upload_max_filesize = 20M
post_max_size = 25M
max_file_uploads = 10
9. Timezone
date.timezone = UTC
10. Realpath Cache
; GOOD: Increased for Symfony/Laravel
realpath_cache_size = 4096K
realpath_cache_ttl = 600
Grep Patterns
Grep: "php.ini-(production|development)" --glob "**/Dockerfile*"
Grep: "opcache\\." --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "^pm[. =]" --glob "**/*.conf"
Grep: "memory_limit" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "display_errors" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "session\\.save_handler" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "upload_max_filesize|post_max_size" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "date\\.timezone" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "realpath_cache" --glob "**/{Dockerfile*,*.ini,*.conf}"
Grep: "opcache\\.jit" --glob "**/{Dockerfile*,*.ini,*.conf}"
Detection Sources
- Dockerfile RUN echo — inline php.ini directives
- COPY'd php.ini — full configuration replacement
- *COPY'd conf.d/.ini** — modular config files
- PHP-FPM pool config — www.conf or custom pools
- Environment variables — PHP_INI_SCAN_DIR overrides
Severity Classification
| Check | Severity | Impact |
|---|---|---|
| Using php.ini-development | Critical | Exposes errors, no OPcache |
| OPcache disabled | Critical | 3-10x slower responses |
| display_errors = On | Critical | Information disclosure |
| memory_limit = -1 | Major | OOM risk |
| validate_timestamps=1 | Major | FS checks per request |
| File-based sessions | Major | Not scalable, data loss |
| No timezone set | Minor | Inconsistent dates |
| Default upload limits | Minor | May block uploads |
| No realpath cache tuning | Minor | Extra FS lookups |
| JIT not configured | Minor | Missing perf gains |
Output Format
### PHP Config Issue: [Description]
**Severity:** Critical/Major/Minor
**Setting:** `directive = value`
**Location:** `Dockerfile:line` or `config-file:line`
**Current Value:**
```ini
directive = current_value
Recommended Value:
directive = recommended_value
Rationale: [Why this setting matters for production]
Current listing version
0.0.1
Quality assessment
Out of 100 · Assessment report from SkillPi LAB.
Highlights
- 针对生产环境 Docker PHP 配置检查的明确痛点
- 提供 BAD/GOOD 对比示例,实用性强
- 覆盖 php.ini、OPcache、PHP-FPM 等关键配置项
Highlights
- 触发描述完整覆盖核心功能点
- 边界清晰,无歧义
Areas to improve
-
缺少 When to Use 章节 Reported severity: Minor
文档结构完整但缺少明确的使用场景说明章节
Recommendation: 建议补充 When to Use 章节,说明适用场景和使用时机
Highlights
- 结构清晰,章节划分合理
- 提供具体配置示例和 severity 分类
- 输出格式标准化
Highlights
- 配置建议具体且有生产环境依据
- 提供 grep 模式用于实际检测
- 覆盖主要异常场景和错误配置
The arithmetic mean of the first four original scores, rounded to a whole number.
Static text checks
100 / 100 · skillpi-20261123-no-r3-v1
No current rules matched the text.
This score reflects rule matches in the text and is provided for reference before use. It excludes attachments and runtime behavior.
Permissions and checks before use
Automatically summarized from this main document. Matches may be examples or defensive advice; they are not actual permission declarations. Attachments, external dependencies and runtime behavior are not covered.
These common operations were not identified in the main document. This does not mean no permissions or risks exist.
Security rating and access scope
safe · Static evidence review; not a runtime safety guarantee.
Before use, confirm and authorize actual file access, external services and network destinations in your host. This review grants no runtime permissions.
User discussion
No verified reviews yet.