我在 php5-recode 和 php5-odbc 上遇到问题。安装了这两个包后,odbc_execute() 会挂起并导致分段错误。我使用一个简单的脚本进行测试
<?php
# DSN "mydb" with a user and password "marin"
$connect = odbc_connect("myaccess", "", "");
# query the users table for name and surname
$query = "SELECT * FROM FRT_NAME";
# perform the query
$result = odbc_exec($connect, $query);
# fetch the data from the database
while(odbc_fetch_row($result)){
$name = odbc_result($result, 2);
print("$name\n");
}
# close the connection
odbc_close($connect);
?>
卸载 php5-recode 后,问题得到解决。