Error PHP + ODBC + Progress 10.1B

EASemashko

New Member
Hello. Anybody can help me with retrieving datd from progress DB via PHP and ODBC?
1) The first my attempt was to use installed php 5.3 and apache2 without reinstalling and reconfiguring. I just installed driver, configured odbc, obcinst files. After that I wrote php script like:

Code:
    putenv ("DLC=/usr/dlc");
    putenv ("LD_LIBRARY_PATH=/usr/dlc/odbc/lib:/usr/dlc/odbc/lib:/usr/dlc/lib");
    putenv ("ODBCINST=/home/apostol/odbcinst.ini");
    putenv ("ODBC_HOME=/usr/dlc/odbc");
    putenv ("ODBCINI=/home/apostol/odbc.ini");
  
    $sql="SELECT * FROM PUB.custgoods";
  
    error_reporting(E_ALL | E_STRICT);
      
    $db_user    =    "website";
    $db_pass    =    "285kdht";
    $dsn        =    "fathom";

    if ($conn_id=odbc_connect($dsn, $db_user, $db_pass,  SQL_CUR_USE_ODBC)){
        echo " connected to DSN: $dsn"."<br />";
            
        if($cur=odbc_exec($conn_id, $sql)) {
            $Fields = odbc_num_fields($cur);
            print "<table border='1' width='100%'> <tr>";
          
            for ($i=1; $i <= $Fields; $i++){
                printf("<th bgcolor='silver'>%s </th>", odbc_field_name($cur,$i));
            }
  
            $Outer=1;
          
            while(odbc_fetch_row($cur)){
                    $Outer++;
                    print "<tr>";
                    for($i=1; $i <= $Fields; $i++){
                        printf("<td>%s</td>", odbc_result($cur, $i));
                    }
                    print "</tr>";              
                }         
          
            print "</table>";
            print " Your request returned $Outer rows!";
          
        } else{
            echo('can not exec');
        }
        odbc_close( $conn_id);
    }else{
        print("connection error");
    }

Connect was Ok, Fields retrieved OK, but odbc_fetch_row cause "Refused connection" page in mozilla Firefox. I don't know why. I tried to understand why. No errors in log, nothing in gdb.

2) The second attempt was to do step-by-step instructions steps in knowledgebase progress at article 000031743
But I have errors on "make" php5 step like these:

Code:
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:2834: undefined reference to `SQLColAttributes'
ext/odbc/.libs/php_odbc.o: In function `_free_odbc_result':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:439: undefined reference to `SQLFreeStmt'
ext/odbc/.libs/php_odbc.o: In function `zif_odbc_num_rows':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:2700: undefined reference to `SQLRowCount'
ext/odbc/.libs/php_odbc.o: In function `zif_odbc_close':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:2668: undefined reference to `executor_globals_id'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:2683: undefined reference to `executor_globals_id'
ext/odbc/.libs/php_odbc.o: In function `zif_odbc_fetch_row':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1985: undefined reference to `SQLExtendedFetch'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1991: undefined reference to `SQLFetch'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1987: undefined reference to `SQLExtendedFetch'
ext/odbc/.libs/php_odbc.o: In function `display_defPW':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:555: undefined reference to `ts_resource_ex'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:572: undefined reference to `core_globals_id'
ext/odbc/.libs/php_odbc.o: In function `display_cursortype':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:643: undefined reference to `ts_resource_ex'
ext/odbc/.libs/php_odbc.o: In function `display_binmode':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:586: undefined reference to `ts_resource_ex'
ext/odbc/.libs/php_odbc.o: In function `display_lrl':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:617: undefined reference to `ts_resource_ex'
ext/odbc/.libs/php_odbc.o: In function `display_link_nums':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:530: undefined reference to `ts_resource_ex'
ext/odbc/.libs/php_odbc.o: In function `zif_odbc_close_all':
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1092: undefined reference to `executor_globals_id'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1103: undefined reference to `executor_globals_id'
/home/apostol/php-5.5.5/ext/odbc/php_odbc.c:1113: undefined reference to `executor_globals_id'
e.t.c.

Please, anybody, help me to resolve this issues, if possible.
 
Top