V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
harrietliu
V2EX  ›  PHP

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

  •  
  •   harrietliu · 66 天前 · 759 次点击
    这是一个创建于 66 天前的主题,其中的信息可能已经有所发展或是发生改变。
    在 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 项目,求各位能帮忙看看
    3 条回复    2024-02-22 11:07:18 +08:00
    harrietliu
        1
    harrietliu  
    OP
       66 天前
    docker 中的 php 是通过 REMI 源安装的
    loginv2
        2
    loginv2  
       65 天前
    Rache1
        3
    Rache1  
       65 天前
    PHPIniDir 这是让你添加一个目录位置,你直接填了文件路径了

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

    PHPIniDir /etc/opt/remi/php73/
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2831 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 27ms · UTC 15:01 · PVG 23:01 · LAX 08:01 · JFK 11:01
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.