Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8419893
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T02:44:30+00:00 2026-06-10T02:44:30+00:00

$connection = db2_connect ( ‘*LOCAL’, PHP_USER_NAME, PHP_USER_PASS ); if (! $connection) { die(‘Could not

  • 0
    $connection = db2_connect ( '*LOCAL', PHP_USER_NAME, PHP_USER_PASS );
    if (! $connection) {
        die('Could not connect');
    }

    //Prepare and execute the SQL statement.
    $stmt = db2_prepare ( $connection, $sqlStatement );

    if (! db2_execute ( $stmt ) ) {
        Throw New Exception('Could not execute statement');
    }

We are running PHP on an IBM iSeries with Apache. Our database is also on this iSeries.

What sort of connection is being established? Is it an ODBC link? If this is something that varies from system to system, how can i tell?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T02:44:32+00:00Added an answer on June 10, 2026 at 2:44 am

    It seems that is is a ODBC connection:

    Try running the function db2_client_info on your client, this should output the needed info. You can run the following code:

    <?php
    $conn = db2_connect( '*LOCAL', PHP_USER_NAME, PHP_USER_PASS );
    $client = db2_client_info( $conn );
    
    if ($client) {
        echo "DRIVER_NAME: ";           var_dump( $client->DRIVER_NAME );
        echo "DRIVER_VER: ";            var_dump( $client->DRIVER_VER );
        echo "DATA_SOURCE_NAME: ";      var_dump( $client->DATA_SOURCE_NAME );
        echo "DRIVER_ODBC_VER: ";       var_dump( $client->DRIVER_ODBC_VER );
        echo "ODBC_VER: ";              var_dump( $client->ODBC_VER );
        echo "ODBC_SQL_CONFORMANCE: ";  var_dump( $client->ODBC_SQL_CONFORMANCE );
        echo "APPL_CODEPAGE: ";         var_dump( $client->APPL_CODEPAGE );
        echo "CONN_CODEPAGE: ";         var_dump( $client->CONN_CODEPAGE );
    }
    else {
        echo "Error retrieving client information.
         Perhaps your database connection was invalid.";
    }
    db2_close($conn);
    
    ?>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In connection string to SQL Server there is max pool size option. My question
Possible Duplicate: Close mysql connection (PHP) Please help me, I not know where add
I have been trying to connect to an Oracle server using the following connection
MySQL connection in PHP can be established in two ways: $mysql = new mysqli('localhost',
My Connection to my test application keeps terminating in the same place without any
This is how my connection is set: Connection conn = DriverManager.getConnection(url + dbName +
How do I read connection strings from custom config file (say abc.config) using WebConfigurationManager
I've checked the connection string (I got it from the server explorer). I've checked
when i use connection.queries in django i get a weird exception: 'list' object is
If HTTP persistent connection is kept alive and done on the same socket with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.