Call to undefined function odbc_connect()

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 ...


Go Back   Usenet Forums > PHP Programming Forums > PHP Language

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2006
Bill
 
Posts: n/a
Default 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


Reply With Quote
  #2 (permalink)  
Old 02-27-2006
J.O. Aho
 
Posts: n/a
Default Re: Call to undefined function odbc_connect()

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
Reply With Quote
  #3 (permalink)  
Old 02-27-2006
Bill
 
Posts: n/a
Default Re: Call to undefined function odbc_connect()

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



Reply With Quote
  #4 (permalink)  
Old 02-27-2006
mich
 
Posts: n/a
Default Re: Call to undefined function odbc_connect()

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

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:56 AM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0