douye7033 2018-08-15 11:52
浏览 47

CentOS - PHP从浏览器调用未定义的函数mysql_connect()[重复]

This question already has an answer here:

I create a sample PHP file to check MYSQL database connection and save as test_db.php

<?php
error_reporting(E_ALL);
ini_set('display_errors', 1);

   $link = mysql_connect("localhost", "root", "1qazxsw2")  or die(mysql_error());;

    mysql_close($link);
?>

When I run command php test_db.php, everything is ok

But when I open it from web browser, it show 'Fatal error: Call to undefined function mysql_connect()'

How can I fix it? Now I use php-5.3.3-49.el6.x86_64

Another information: It show '--without-mysql' in php_info

</div>
  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求TYPCE母转母转接头24PIN线路板图
    • ¥100 国外网络搭建,有偿交流
    • ¥15 高价求中通快递查询接口
    • ¥15 解决一个加好友限制问题 或者有好的方案
    • ¥15 急matlab编程仿真二阶震荡系统
    • ¥20 TEC-9的数据通路实验
    • ¥15 ue5 .3之前好好的现在只要是激活关卡就会崩溃
    • ¥50 MATLAB实现圆柱体容器内球形颗粒堆积
    • ¥15 python如何将动态的多个子列表,拼接后进行集合的交集
    • ¥20 vitis-ai量化基于pytorch框架下的yolov5模型