V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
harrietliu
V2EX  ›  PHP

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

  •  
  •   harrietliu · Feb 21, 2024 · 1743 views
    This topic created in 796 days ago, the information mentioned may be changed or developed.
    在 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 replies    2024-02-22 11:07:18 +08:00
    harrietliu
        1
    harrietliu  
    OP
       Feb 21, 2024
    docker 中的 php 是通过 REMI 源安装的
    loginv2
        2
    loginv2  
       Feb 22, 2024
    Rache1
        3
    Rache1  
       Feb 22, 2024
    PHPIniDir 这是让你添加一个目录位置,你直接填了文件路径了

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

    PHPIniDir /etc/opt/remi/php73/
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   989 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 35ms · UTC 19:11 · PVG 03:11 · LAX 12:11 · JFK 15:11
    ♥ Do have faith in what you're doing.