Bug: PHP 5.6 runtime extension build for ionCube always fails — install-ext checks wrong module name ($1 vs $2)
Maintainer thường phản hồi trong vòng 1 ngày
@wanghe-fit2cloud đang làm issue này rồi.
Từ ngày 9/11/2026.
Đánh giá
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 52/100
Hướng nghiên cứu
Start with the PHP 5 app recipe at /opt/1panel/resource/apps/remote/php/5/build/data/install-ext and inspect install_php_extensions() alongside the ionCube call that passes ionCube Loader. Compare the check against the module name shown by php -m; the report also flags a separate loader compatibility concern for PHP 5.6. Done means the wrapper reports successful installation when the installed module is present, with the PHP 5.6 loader behavior addressed or clearly scoped.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug: PHP runtime extension install can never succeed for ionCube on PHP 5.6 patched images (name mismatch in install-ext)
Environment
- 1Panel
v2.4.2(OSS), Debian 13 x86_64, Docker - Runtime: App Store PHP runtime
legacy-php5661, image1panel/php:5.6.41-fpm+ 1Panelinstall-extlayer - Extension:
ionCube(build recipe for the5/xapp:/opt/1panel/resource/apps/remote/php/5/build/data/install-ext)
Steps to reproduce
- Create a PHP 5.6.x runtime from the App Store with the
ionCubeextension selected (or install the extension afterwards from Websites → Runtimes → PHP → Extension → ionCube). - The extension build starts
install-php-extensions ioncube_loaderand reports failure every time, regardless of network state or retries (/opt/1panel/log/task/RuntimeExtension/<id>.logends with------ install-php-extensions ioncube_loader failed ------, then[TASK END]failure).
Root cause
The app template wrapper only checks success by re-grepping php -m for the wrapper argument, not by the module's real name:
install_php_extensions() {
local extension=$1
install-php-extensions $extension
if is_extension_installed "$extension"; then # ← checks "$extension"
install-php-extensions ioncube_loadersucceeds and enableszend_extension=ioncube_loader.so;php -mthen lists the module as
ionCube Loader(with a space)is_extension_installed "ioncube_loader"doesphp -m | grep -q '^ioncube_loader$'→ never matches → wrapper exits 1 → whole install marked failed- Note the second parameter ("ionCube Loader") that the call site passes on line 313 (
install_php_extensions ioncube_loader "ionCube Loader") is ignored byinstall_php_extensions()— it looks like the wrapper was meant to verify with the display name.
Verified directly: running the identical install-php-extensions ioncube_loader by hand inside the same image exits 0 and enables the loader; only the wrapper's is_extension_installed gate declares failure. The task failure then aborts the whole image build, so the runtime never receives ionCube.
Suggested fix
In install_php_extensions() (all PHP app-recipe install-ext files), verify against the loaded extension name rather than the wrapper argument, e.g.:
install_php_extensions() {
local extension=$1
local check_name=${2:-$extension}
install-php-extensions $extension
if is_extension_installed "$check_name"; then # "ionCube Loader" for ionCube
or normalise the php -m output (strip whitespace/case) before comparing.
Actual observed behaviour on 5.6
- Install always fails at the "check" stage (exit 1), no image produced, runtime untouched.
- Rejected hashes of
md5(apiKey.action.user.pass)also surface later when the operator installs a loader manually — but that is the vendor-side inet-cash protocol, not 1Panel's issue; keeping it short here.
Happy to attach the full RuntimeExtension task log + php -i fragments if useful.
Secondary finding (same build path, for completeness)
Even with the wrapper fixed, the ionCube build for the patched PHP 5.6 runtime is not safe by default: the loader install-php-extensions fetches ("latest", v15.5.1) segfaults FPM workers on PHP 5.6.40/5.6.41 (custom builds) whenever a deeply-encoded script runs — pool dies in a SIGSEGV loop (verified on both the vendor image and the patched 1Panel image, with plain CLI php -l passing). The 10.2.4 loader (2018 archive) runs the identical workload clean. Recommend pinning a known-good loader for 5.6, or at least testing an encoded file inside FPM in the build, before shipping the loader.
- Ngôn ngữ chính
- Go
- Star
- 37.4k
- Fork
- 3.4k
- Merge trung bình
- 8 giờ 5 phút
- Pull request đã merge (30 ngày)
- 176
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của 1Panel-dev/1Panel
-
[Bug]Có thể đã có người làm @wanghe-fit2cloud đã nhận hôm nay. Đang mở
1Panel-dev/1Panel#14399 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] 确认框优化Có thể đã có người làm @wanghe-fit2cloud đã nhận hôm nay. Đang mở
1Panel-dev/1Panel#14398 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] 增加一键推送模型部署功能Có thể đã có người làm @wanghe-fit2cloud đã nhận hôm nay. Đang mở
1Panel-dev/1Panel#14395 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] The AI gateway session duration is too short, and I don't know how to renew it.Có thể đã có người làm @wanghe-fit2cloud đã nhận hôm nay. Đang mởtype: ai-gateway
1Panel-dev/1Panel#14394 · 3 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
-
[Feature] .NET 11 has been released; please update the runtime environmentCó thể đã có người làm @wanghe-fit2cloud đã nhận 1 ngày trước. Đang mởtype: feature-request
1Panel-dev/1Panel#14393 · 1 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của 1Panel-dev/1Panel
Issue tương tự
-
bug category:backup
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 73/100
LanternOps/breeze#11743 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
bug triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
wavetermdev/waveterm#3587 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
enhancement
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
kubescape/synchronizer#208 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100