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 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵