Call to undefined function odbc_connect()

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Bill

    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={Micro soft Access Driver
    (*.mdb)};DBQ=/mnt/pen1800d/access\newres.m db', '', '');

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

    Thanks


  • J.O. Aho

    #2
    Re: Call to undefined function odbc_connect()

    Bill wrote:[color=blue]
    > 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={Micro soft Access Driver
    > (*.mdb)};DBQ=/mnt/pen1800d/access\newres.m db', '', '');
    >
    > In windows, no error.
    > I thought odbc was integrated in php.
    > What do i have to install then and what about php.ini?[/color]

    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

    Comment

    • Bill

      #3
      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.n et> schreef in bericht
      news:46gduiFb06 svU1@individual .net...[color=blue]
      > Bill wrote:[color=green]
      >> 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={Micro soft Access Driver
      >> (*.mdb)};DBQ=/mnt/pen1800d/access\newres.m db', '', '');
      >>
      >> In windows, no error.
      >> I thought odbc was integrated in php.
      >> What do i have to install then and what about php.ini?[/color]
      >
      > 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[/color]


      Comment

      • mich

        #4
        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_LIB S="-ldblib -lodbc"
        --with-iodbc[=DIR] Include iODBC support. DIR is the iODBC base
        --with-pdo-odbc=flavour,di r
        --with-pdo-odbc=unixODBC

        --with-pdo-odbc=generic,di r,libname,ldfla gs,cflags
        named pdo_odbc.so

        Comment

        Working...