unixodbc与php命令有效,但apache2失败

时间:2014-08-12 02:44:58

标签: php apache unixodbc

我在Ubuntu 12.04.4 LTS(GNU / Linux 3.8.0-44-generic i686)上安装了unixodbc,freetds,php,我的查询工作正常:

php /var/www/connect.php

但是当访问 localhost / connect.php 时,我得到:

Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /var/www/connect.php on line 8 Warning: odbc_exec() expects parameter 1 to be resource, boolean given in /var/www/connect.php on line 10 Warning: odbc_fetch_row() expects parameter 1 to be resource, null given in /var/www/connect.php on line 11 Warning: odbc_close() expects parameter 1 to be resource, boolean given in /var/www/connect.php on line 15

我认为是关于权限的。

0 个答案:

没有答案