PHP警告:PHP启动:无法加载动态库'/usr/local/lib/php/extensions/no-debug-non-zts-20090626/mysqli.so'

时间:2014-03-22 12:57:12

标签: php mysqli

我有这个错误。我已经在谷歌搜索了2天,但问题仍然存在。

错误消息:

[20-Mar-2014 08:48:00 America/New_York] PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/local/lib/php/extensions/no-debug-non-zts-20090626/mysqli.so' - libmysqlclient.so.15: cannot open shared object file: No such file or directory in Unknown on line 0]

代码:

$flmconn = mysqli_connect("$host", "$username", "$password");
    if(! $flmconn )
        {
            die('Could not connect: ' . mysql_error());
        }
$db_select = mysqli_select_db($flmconn, $db_name);
    if (!$db_select) 
        {
            die("Database selection failed: " . mysqli_error());
        }
    $sql= mysqli_query($flmconn, "select * from gallery");
    while ($row = mysqli_fetch_array( $sql, MYSQL_ASSOC )) 
    {
        $id = $row['id'];
        $thumb = $row['thumb'];
        $pic = $row['pic'];

其他查询可以正常运行:

$sql= mysqli_query($flmconn, "select * from partner");
    while ($row = mysqli_fetch_array( $sql, MYSQL_ASSOC )) 
    {
        $heading = $row['heading'];
        $text = $row['text'];
        $pic = $row['text_pic'];

1 个答案:

答案 0 :(得分:0)

很久以前,但问题在于

MYSQL_ASSOC

而不是

MYSQL_ASSOC 

需要使用

MYSQLI_ASSOC