dongluo3331 2017-01-12 17:28
浏览 45
已采纳

php5和httpd的奇怪问题

Issue 1:

I am getting the following message when starting httpd:

Starting httpd: [Thu Jan 12 18:05:40 2017] [warn] module php5_module is already loaded, skipping

So I was opening the httpd.conf located at /etc/httpd/conf/httpd.conf and couldn't find where php5 is getting loaded. Google ment that I should remove this part:

LoadModule php5_module /usr/lib64/httpd/modules/libphp5.so

Issue 2:

I am not able to use mysql correctly in php. Google said that I should add a mysql extension to the php.ini. Weirdly the php.ini is located at /opt/remi/php55/root/etc/php.ini. Also at /opt/remi/ is a folder called php54 but I think that the folder is useless because I am using the version 5.6.29. Also there's no module called 'mysql.so'. Yes, I installed php and php-mysql.

I use CentOs 6.8.

  • 写回答

1条回答 默认 最新

  • dongyan2267 2017-01-13 05:41
    关注

    You have installed various versions of mod_php, when Apache only allows one.

    So you got the expected warning "module php5_module is already loaded". You have to disabled unwanted versions (of uninstall them).

    You are using Software Collections (from "remi-safe" repository) which are designed for parallel installation (so use path under /opt)

    • If you use base version (php) you need php-mysql
    • If you use SCL version 5.6 (php56-php), you need php56-php-mysqlnd

    If you want a single version, probably simpler to not use the SCL, but the base packages available in "remi-php56" repository.

    See the Wizard instructions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 Arcgis相交分析无法绘制一个或多个图形
  • ¥15 seatunnel-web使用SQL组件时候后台报错,无法找到表格
  • ¥15 fpga自动售货机数码管(相关搜索:数字时钟)
  • ¥15 用前端向数据库插入数据,通过debug发现数据能走到后端,但是放行之后就会提示错误
  • ¥30 3天&7天&&15天&销量如何统计同一行
  • ¥30 帮我写一段可以读取LD2450数据并计算距离的Arduino代码
  • ¥15 飞机曲面部件如机翼,壁板等具体的孔位模型
  • ¥15 vs2019中数据导出问题
  • ¥20 云服务Linux系统TCP-MSS值修改?
  • ¥20 关于#单片机#的问题:项目:使用模拟iic与ov2640通讯环境:F407问题:读取的ID号总是0xff,自己调了调发现在读从机数据时,SDA线上并未有信号变化(语言-c语言)