This is a discussion on Call to undefined function odbc_connect() within the PHP Language forums, part of the PHP Programming Forums category; Hi, I installed PHP 5.0 on my linux box. In php.ini, i added this: extension=odbc.so But ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
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 |
|
|||
|
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 |
|
|||
|
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" <user@example.net> schreef in bericht news:46gduiFb06svU1@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 |
|
|||
|
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 |