doushun4666 2019-03-06 08:31
浏览 606

在PHP中启用mysql支持

I am trying to add MySql support in PHP. I am using PHP version 7.2.11. When i'm trying to run my application, it shows the following error:

Your PHP installation does not have MySQL support. Please enable MySQL support in PHP or ask your web host to do so for you.

This problem didn't occur when i tried with older versions of PHP. Any help would be appreciated.

  • 写回答

1条回答 默认 最新

  • douyu7210 2019-03-07 04:23
    关注

    1- Update the required packages If your are running an Ubuntu VPS and PHP 7, then run the following commands:

    apt-get update
    apt-get install php7.0-mysql
    

    if you are running a CentOS VPS and you have PHP 7, then run the following commands to fix the problem:

    yum update
    yum install php70w-mysql
    

    2- Restart the Web Server,

    If your are running an Ubuntu, then run the following commands:

    sudo service apache2 reload
    

    If your are running an CentOS, then run the following commands:

    sudo systemctl reload httpd.service
    
    评论

报告相同问题?

悬赏问题

  • ¥100 求三轴之间相互配合画圆以及直线的算法
  • ¥100 c语言,请帮蒟蒻写一个题的范例作参考
  • ¥15 名为“Product”的列已属于此 DataTable
  • ¥15 安卓adb backup备份应用数据失败
  • ¥15 eclipse运行项目时遇到的问题
  • ¥15 关于#c##的问题:最近需要用CAT工具Trados进行一些开发
  • ¥15 南大pa1 小游戏没有界面,并且报了如下错误,尝试过换显卡驱动,但是好像不行
  • ¥15 自己瞎改改,结果现在又运行不了了
  • ¥15 链式存储应该如何解决
  • ¥15 没有证书,nginx怎么反向代理到只能接受https的公网网站