Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Interbase and PHP blues

  • 20-02-2002 3:50pm
    #1
    Registered Users, Registered Users 2 Posts: 14,149 ✭✭✭✭


    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 Posts: 14,149 ✭✭✭✭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 Posts: 14,149 ✭✭✭✭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 Posts: 14,149 ✭✭✭✭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