php 5.3.3不加载mysql扩展

时间:2015-10-07 02:05:46

标签: php mysql

我有运行php 5.3.3和mysql 5.1.73的vps

问题是当我调用mysql_connect()时它说: Fatal error: Call to undefined function mysql_connect() in xyz.php on line 27

我尝试使用以下代码段来查看已加载的扩展程序:

<?php // extensions_list.php 
$list = get_loaded_extensions(); 
$list2 = array_map('strtolower',$list); 
sort($list2); 
echo '<pre>'.print_r($list2,true).'</pre>'; 
?>

它生成了以下输出:

Array
(
    [0] => apache2handler
    [1] => bz2
    [2] => calendar
    [3] => core
    [4] => ctype
    [5] => curl
    [6] => date
    [7] => ereg
    [8] => exif
    [9] => fileinfo
    [10] => filter
    [11] => ftp
    [12] => gettext
    [13] => gmp
    [14] => hash
    [15] => iconv
    [16] => json
    [17] => libxml
    [18] => openssl
    [19] => pcre
    [20] => phar
    [21] => reflection
    [22] => session
    [23] => shmop
    [24] => simplexml
    [25] => sockets
    [26] => spl
    [27] => standard
    [28] => tokenizer
    [29] => xml
    [30] => zip
    [31] => zlib
)

我尝试添加mysql扩展名:

ini_set('extension=mysql.so',1);

但仍然没有帮助。

0 个答案:

没有答案