470,848 Members | 972 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,848 developers. It's quick & easy.

Call to undefined function odbc_connect()

Hi,
I installed PHP 5.0 on my linux box.
In php.ini, i added this: extension=odbc.so
But i still get the error:"Call to undefined function odbc_connect()" when
trying to run this command:
$connect = odbc_connect ('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=/mnt/pen1800d/access\newres.mdb', '', '');

In windows, no error.
I thought odbc was integrated in php.
What do i have to install then and what about php.ini?

Thanks
Feb 27 '06 #1
3 24059
Bill wrote:
Hi,
I installed PHP 5.0 on my linux box.
In php.ini, i added this: extension=odbc.so
But i still get the error:"Call to undefined function odbc_connect()" when
trying to run this command:
$connect = odbc_connect ('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=/mnt/pen1800d/access\newres.mdb', '', '');

In windows, no error.
I thought odbc was integrated in php.
What do i have to install then and what about php.ini?


The PHP has been compiled without the odbc support or the odbc part has been
split into another package which you need to install.
//Aho
Feb 27 '06 #2
Thanks for replying.
I downloaded the file PHP-5.1.2 (tar.gz).
How can i know whether odbc module is included?
Can you tell me the option in order to compile php with odbc? (something
like --odbc ?)?
Thanks
"J.O. Aho" <us**@example.net> schreef in bericht
news:46************@individual.net...
Bill wrote:
Hi,
I installed PHP 5.0 on my linux box.
In php.ini, i added this: extension=odbc.so
But i still get the error:"Call to undefined function odbc_connect()"
when trying to run this command:
$connect = odbc_connect ('DRIVER={Microsoft Access Driver
(*.mdb)};DBQ=/mnt/pen1800d/access\newres.mdb', '', '');

In windows, no error.
I thought odbc was integrated in php.
What do i have to install then and what about php.ini?


The PHP has been compiled without the odbc support or the odbc part has
been split into another package which you need to install.
//Aho

Feb 27 '06 #3
root@mich work/php-5.1.2# ./configure --help |g odbc
--with-custom-odbc[=DIR]
have some odbc.h in your include dirs.
CUSTOM_ODBC_LIBS="-ldblib -lodbc"
--with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
--with-pdo-odbc=flavour,dir
--with-pdo-odbc=unixODBC

--with-pdo-odbc=generic,dir,libname,ldflags,cflags
named pdo_odbc.so

Feb 27 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by obi wan kenobi | last post: by
4 posts views Thread by gc | last post: by
1 post views Thread by annie | last post: by
1 post views Thread by franscescomoi | last post: by
1 post views Thread by muelli75 | last post: by
1 post views Thread by drewmania001 | last post: by
8 posts views Thread by Cruella DeVille | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.