php - 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 和其他一些东西,但没有任何东西改变错误,所以我不相信这些都是正确的进展路线。
任何正确方向的帮助或提示都会很棒,我和我的朋友已经为此工作了一周左右,但找不到解决方法。如果您觉得它们可能会有所帮助,我还可以添加配置文件和东西,请问。
解决方案
推荐阅读
- python - Pandas 数据框 - 基于组的每列的总和
- java - 如何在 Google Guice 中重用对象的现有实例?
- docker - 我可以在没有主机网络的谷歌云虚拟机实例上部署 docker
- ios - 如何从不同的 ViewController 执行 collectionView 类
- javascript - Rails AJAX 和 webpacker
- javascript - Nodejs:没有类型声明的路由
- django - Django 守护者 user.has_perm false 用于现有数据
- mysql - 根据组合条件在 MySQL 中查找重复值
- python - 当我使用 if 语句使用 flex 传感器移动光标时,在将传感器弯曲更长的时间后,值保持不变
- google-apps-script - 从电子表格在 Google Apps 脚本中发布的 URL 获取云端硬盘文件 ID