首页 > 解决方案 > PHP-fpm session_start() 在 ptero 容器中不受保护

问题描述

我有一个使用 nginx 和 fpm egg ( https://gitlab.com/tenten8401/pterodactyl-nginx ) 运行的翼龙容器,并且正在尝试将我的 sharex 图像上传器从我的旧站点移走。但是,每次我尝试访问该站点时,我都会收到此错误

2021/06/08 19:25:38 [error] 19#19: *7 FastCGI sent in stderr: "PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function session_start() in /home/container/webroot/index.php:4
Stack trace:
#0 {main}
  thrown in /home/container/webroot/index.php on line 4" while reading response header from upstream, client: ip.address, server: , request: "GET / HTTP/1.0", upstream: "fastcgi://unix:/tmp/php-fpm.sock:", host: "ip.address:20004"
173.249.9.172 - - [08/Jun/2021:19:25:38 +0000] "GET / HTTP/1.0" 500 0 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ip.address Safari/537.36"

我已尝试安装此答案中找到的软件包(Call to undefined function session_start()),但它只是说在路径上找不到 opkg 对于 php -i 再次说在路径上找不到 php (两者都在码头集装箱)。我也尝试过apk add php7-mod-session,但我从容器中得到一个权限错误。

我已经尝试了一些东西,从将 php-mod-session 添加到 apk add 和其他一些东西,但没有任何东西改变错误,所以我不相信这些都是正确的进展路线。

任何正确方向的帮助或提示都会很棒,我和我的朋友已经为此工作了一周左右,但找不到解决方法。如果您觉得它们可能会有所帮助,我还可以添加配置文件和东西,请问。

标签: phpdockernginx

解决方案


推荐阅读