Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

Interbase and PHP blues

  • 20-02-2002 04:50PM
    #1
    Registered Users, Registered Users 2, Paid Member Posts: 14,174 ✭✭✭✭


    hey guys,

    got another question (looking at no-one in particular .. dahamsta ;) )

    I'm trying to get a php script connecting to an Interbase (v.5) dbase. Nothing fancy, just a straight forward connect, query, display, disconnect according to the PHP documentation.

    Here's the code:

    <?php

    $host = 'x' ;
    $username = 'y' ;
    $password = 'z' ;

    if(($dbObj = ibase_connect($host, $username, $password)) != null)
    {
    $query = 'select * from mytable' ;
    $result = ibase_query($dbObj, $query) ;

    while($row = ibase_fetch_object($result))
    print $row->fieldvalue."\n" ;

    ibase_close($dbObj) ;
    }
    else
    echo "Connection Failed\n" ;
    ?>

    I keep getting the following message:
    Fatal error: Call to undefined function: ibase_connect() in xxxxxxxx/test.php on line 7

    ANy ideas?

    (what is it about me and PHP/DBase related questions??)


Comments

  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    PHP ain't compiled with Interbase support Lemming, or else the module ain't loaded. Check your phpinfo(), and the startup output.

    adam


  • Registered Users, Registered Users 2, Paid Member Posts: 14,174 ✭✭✭✭Lemming


    Originally posted by dahamsta
    PHP ain't compiled with Interbase support Lemming, or else the module ain't loaded. Check your phpinfo(), and the startup output.

    adam

    arggghhhhhhhhhh

    time go ask the admin very nicely to recompile php ;)


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    time go ask the admin very nicely to recompile php

    Ha! You'll be lucky! You don't think us BOFH's listen to people like you, do you? :)

    adam


  • Registered Users, Registered Users 2, Paid Member Posts: 14,174 ✭✭✭✭Lemming


    Originally posted by dahamsta
    time go ask the admin very nicely to recompile php

    Ha! You'll be lucky! You don't think us BOFH's listen to people like you, do you? :)

    adam

    I can be very persusasive

    Thes aren't the droids you're looking for :P

    anyway .. got a quick url where I can get the mod_interbase.so module for php?


  • Closed Accounts Posts: 296 ✭✭moist


    Just pass the --with-interbase switch when your configuring php,
    you may have to point it to the install directory of interbase
    " ./configure --with-interbase=/path/to/interbase --otherargs.... "


  • Advertisement
  • Registered Users, Registered Users 2, Paid Member Posts: 14,174 ✭✭✭✭Lemming


    Originally posted by moist
    Just pass the --with-interbase switch when your configuring php,
    you may have to point it to the install directory of interbase
    " ./configure --with-interbase=/path/to/interbase --otherargs.... "

    Well .. the php module for interbase appears to be missing, so won't I need that before I (or BOFH operating with hand twisted behind back courtesy of me) do any such configuring ?


  • Banned (with Prison Access) Posts: 16,659 ✭✭✭✭dahamsta


    No, the source code for the Interbase module is included in the PHP tarball. As long as the Interbase libs are available and in the linker's path, --with-interbase=/path/to/interbase will build Interbase support into the library/binary. If you want to build it as a shared module (and load it from within php.ini), amend the configure argument to --with-interbase=/path/to/interbase,shared.

    adam


Advertisement