I am getting this error from the following code:
$result = odbc_connect("DRIVER={MySQL ODBC 3.51 Driver};Server=localhost;Database=$database_name",$database_username, $database_password);
Warning: odbc_connect(): SQL error: [unixODBC][Driver Manager]Data source name not found, and no default driver specified, SQL state IM002 in SQLConnect in /dbconnect.php on line xx odbc not connected
I am using MySQL version 5.1.41-3ubuntu12.3
My phpinfo gives the following output:
Additional .ini files parsed /etc/php5/apache2/conf.d/odbc.ini, /etc/php5/apache2/conf.d/pdo_odbc.ini
odbc
----
ODBC Support enabled <br>
You must have an ODBC driver installed. http://packages.ubuntu.com/hardy/unixodbc