求各位帮忙看看 centos 的 docker 中安装 apache,在配置文件中添加 PHP .ini 后启动失败

241 天前
 harrietliu
在 centos7 中安装了 docker ,想要配置 owncloud ,但由于宿主机的 php 版本是 8.2.1 ,owncloud 不支持 php 大于 7.5 ,并且宿主机上依赖 php 运行了一些服务,因此想在 docker 中安装低版本的 php
docker 中 php 版本是 7.3.33 ,当我在 apache 配置文件 httpd.conf 中加上 PHPIniDir /etc/opt/remi/php73/php.ini 后,httpd 就启动失败了,error log 如下

[Wed Feb 21 06:41:53.418770 2024] [:error] [pid 296] AH00000: sd_notifyf returned an error -4
[Wed Feb 21 06:41:54.420020 2024] [mpm_prefork:notice] [pid 296] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Feb 21 07:08:36.527866 2024] [suexec:notice] [pid 739] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.2. Set the 'ServerName' directive globally to suppress this message
[Wed Feb 21 07:08:36.539063 2024] [lbmethod_heartbeat:notice] [pid 739] AH02282: No slotmem from mod_heartmonitor
[Wed Feb 21 07:08:36.544309 2024] [mpm_prefork:notice] [pid 739] AH00163: Apache/2.4.6 (CentOS) configured -- resuming normal operations
[Wed Feb 21 07:08:36.544373 2024] [core:notice] [pid 739] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

我不懂 php ,但是无奈要部署 php 项目,求各位能帮忙看看
1025 次点击
所在节点    PHP
3 条回复
harrietliu
241 天前
docker 中的 php 是通过 REMI 源安装的
loginv2
240 天前
Rache1
240 天前
PHPIniDir 这是让你添加一个目录位置,你直接填了文件路径了

确保这个路径的文件存在的话,改为以下试试

PHPIniDir /etc/opt/remi/php73/

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1017231

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX