Bug: PHP 5.6 runtime extension build for ionCube always fails — install-ext checks wrong module name ($1 vs $2)
维护者通常 1 天内回复
@wanghe-fit2cloud 已经在做这个了。
开始于 2026年11月9日。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 52/100
调研方向
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.
由索引模型根据 Issue 内容生成。
描述
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.
- 主要语言
- Go
- 星标
- 37.4k
- 派生
- 3.4k
- 平均合并
- 8 小时 5 分钟
- 30 天内合并 PR
- 176
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
1Panel-dev/1Panel 的其他 Issue
-
[Bug]可能已有人在做 @wanghe-fit2cloud 今天认领。 未关闭
1Panel-dev/1Panel#14399 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] 确认框优化可能已有人在做 @wanghe-fit2cloud 今天认领。 未关闭
1Panel-dev/1Panel#14398 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] 增加一键推送模型部署功能可能已有人在做 @wanghe-fit2cloud 今天认领。 未关闭
1Panel-dev/1Panel#14395 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] The AI gateway session duration is too short, and I don't know how to renew it.可能已有人在做 @wanghe-fit2cloud 于 1 天前认领。 未关闭type: ai-gateway
1Panel-dev/1Panel#14394 · 3 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
-
[Feature] .NET 11 has been released; please update the runtime environment可能已有人在做 @wanghe-fit2cloud 于 1 天前认领。 未关闭type: feature-request
1Panel-dev/1Panel#14393 · 1 条评论 · 已指派 1 人 ·
维护者通常 1 天内回复
查看 1Panel-dev/1Panel 的全部 Issue
相似的 Issue
-
dropIndexes by key pattern panics on a shorter pattern and drops the wrong index on a longer one未关闭
难度 2/5 1-3 小时 新手友好度 85/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
area/installation kind/bug
难度 2/5 1-3 小时 新手友好度 78/100
vllm-project/aibrix#3456 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
gotestyourself/gotestsum#579 ·