from PHP -> db2_connect() Undefined Function

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

    from PHP -> db2_connect() Undefined Function

    I'm trying to access a Cloudscape/Derby database
    via PHP and am using the IBM DB2 Lite client
    which I have installed.

    As soon as I call db2_connect(... ) in the
    php code, I get a db2_connect Undefined function error message,
    so it is not finding this function in the IBM DB2 stuff.

    I've verified that the Apache Server, PHP
    and DB2 and the config and ini files that go
    with them are all set up OK.

    I also made sure that my php.ini has a line that says
    extension=php_i bm_db2.dll
    and that the php_ibm_db2.dll exists
    in the c:\php\ext directory
    (I also copied php_ibm_db2.dll to
    c:\windows\syst em32 just to be sure).

    BUT.. I notice that in my c:\Program Files\
    IBM\SQLLIB\
    directory where DB2 lite client is installed,
    there is NO include subdirectory.

    Is that what I'm missing and if so,
    how do I get it?

    Thanks
    Jim


  • Musashi

    #2
    Re: from PHP -> db2_connect() Undefined Function

    OK, I can connect to the database OK
    after properly configuring my XP ODBC connection
    from administrator tools - but
    it only works if I use "odbc_conne ct" instead of
    "db2_connec t".

    Any attempt to use a function starting with db2_
    fails with "undefined function" message.

    Does this mean the PHP 5 that I installed
    did not have support for DB2 compiled in?

    or...

    Can I tell from my php_info() if the PHP 5 that I installed
    has compiled in support for db2??

    Thanks
    J


    "Musashi" <musashi@okogyo .net> wrote in message
    news:7At9f.1293 2$gj1.713@fed1r ead05...[color=blue]
    > I'm trying to access a Cloudscape/Derby database
    > via PHP and am using the IBM DB2 Lite client
    > which I have installed.
    >
    > As soon as I call db2_connect(... ) in the
    > php code, I get a db2_connect Undefined function error message,
    > so it is not finding this function in the IBM DB2 stuff.
    >
    > I've verified that the Apache Server, PHP
    > and DB2 and the config and ini files that go
    > with them are all set up OK.
    >
    > I also made sure that my php.ini has a line that says
    > extension=php_i bm_db2.dll
    > and that the php_ibm_db2.dll exists
    > in the c:\php\ext directory
    > (I also copied php_ibm_db2.dll to
    > c:\windows\syst em32 just to be sure).
    >
    > BUT.. I notice that in my c:\Program Files\
    > IBM\SQLLIB\
    > directory where DB2 lite client is installed,
    > there is NO include subdirectory.
    >
    > Is that what I'm missing and if so,
    > how do I get it?
    >
    > Thanks
    > Jim
    >[/color]


    Comment

    • Musashi

      #3
      Re: from PHP -&gt; db2_connect() Undefined Function

      Ah yes... the setting in the apache .conf file
      that says phpIniDir is at C:\PHP.

      I should have known.

      db2_ funcs working fine now.

      J

      "Musashi" <musashi@okogyo .net> wrote in message
      news:FGO9f.1308 7$gj1.3759@fed1 read05...[color=blue]
      > OK, I can connect to the database OK
      > after properly configuring my XP ODBC connection
      > from administrator tools - but
      > it only works if I use "odbc_conne ct" instead of
      > "db2_connec t".
      >
      > Any attempt to use a function starting with db2_
      > fails with "undefined function" message.
      >
      > Does this mean the PHP 5 that I installed
      > did not have support for DB2 compiled in?
      >
      > or...
      >
      > Can I tell from my php_info() if the PHP 5 that I installed
      > has compiled in support for db2??
      >
      > Thanks
      > J
      >
      >
      > "Musashi" <musashi@okogyo .net> wrote in message
      > news:7At9f.1293 2$gj1.713@fed1r ead05...[color=green]
      >> I'm trying to access a Cloudscape/Derby database
      >> via PHP and am using the IBM DB2 Lite client
      >> which I have installed.
      >>
      >> As soon as I call db2_connect(... ) in the
      >> php code, I get a db2_connect Undefined function error message,
      >> so it is not finding this function in the IBM DB2 stuff.
      >>
      >> I've verified that the Apache Server, PHP
      >> and DB2 and the config and ini files that go
      >> with them are all set up OK.
      >>
      >> I also made sure that my php.ini has a line that says
      >> extension=php_i bm_db2.dll
      >> and that the php_ibm_db2.dll exists
      >> in the c:\php\ext directory
      >> (I also copied php_ibm_db2.dll to
      >> c:\windows\syst em32 just to be sure).
      >>
      >> BUT.. I notice that in my c:\Program Files\
      >> IBM\SQLLIB\
      >> directory where DB2 lite client is installed,
      >> there is NO include subdirectory.
      >>
      >> Is that what I'm missing and if so,
      >> how do I get it?
      >>
      >> Thanks
      >> Jim
      >>[/color]
      >
      >[/color]


      Comment

      • otrWalter@torres.ws

        #4
        Re: from PHP -&gt; db2_connect() Undefined Function


        Musashi wrote:[color=blue]
        > Ah yes... the setting in the apache .conf file
        > that says phpIniDir is at C:\PHP.
        >
        > I should have known.[/color]

        Yes, the "Microsoft Way" says it "should be" on C drive.

        But I say NO!

        I have a method that installs Perl, PHP, Apache and mySQL on a PC in 20
        minutes, backs up in 3 and restores in 5.

        And not a single file in in the WINDOWS directory or C root or key in
        the registry.

        web.torres.ws/walters_way

        If anyone is interested.

        Walter

        Comment

        Working...