OpenEdge 11.5 ODBC pgoe27.so Segmentation fault

Posted by Valeriy Bashkatov on 09-Apr-2015 03:51

Hello,

OS: CentOS
Linux 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686 i686 i386 GNU/Linux

OpenEdge:
Progress OpenEdge Release 11.5 build 1114 on Linux
32 bit

PHP: 5.3.3

When attempting to connect to the database from PHP this program does not work:

<?PHP

$dsn = "Progress";

putenv("LD_LIBRARY_PATH=/usr/dlc/odbc/lib:/usr/dlc/lib");
putenv("ODBCINI=/etc/odbc.ini");

Print "Test ODBC Progress <br>";

$sql="SELECT * FROM PUB.Customer";
if ($conn_id=odbc_connect("Progress","sysprogress","123", SQL_CUR_USE_ODBC)){
echo "connected to DSN: $dsn <br>";
if($result=odbc_do($conn_id, $sql)) {
echo "executing '$sql'";
echo " Results: ";
odbc_result_all($result, "BGCOLOR='#AAFFAA' border=3 width=30% bordercolordark='#FF0000'");
echo "freeing result";
odbc_free_result($result);
}else{
echo "can not execute '$sql' ";
}
echo " closing connection $conn_id";
odbc_close($conn_id);
}else{
echo " can not connect to DSN: $dsn ";
}
?>


But it works on the OpenEdge 10.2B.

I checked the session by the debugger and I see:

gdb httpd /tmp/core.24452
...
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x01174c89 in SQLGetInfoW () from /usr/dlc/odbc/lib/pgoe27.so

Has anyone had the same error in OpenEdge 11.5?
How can I fix it?

Posted by Paul Koufalis on 10-Apr-2015 06:57

Since it worked with the ODBC sample you need to try with PHP 5.6. Maybe DataDirect *fixed* a bug from pgoe23 to pgoe27.

Again, we hit a similar bug so we directly downloaded the distribution from Zend and not php. IIRC the PHP bug was introduced in 5.5 (no bug in 5.3) where if the first field in the SELECT was CHAR then it treated all the fields as CHAR, so you couldn't do something like "SELECT fChar, fChar, fInt FROM ..."

All Replies

Posted by Chandra Sekhar on 09-Apr-2015 08:26

Hi,
 
 
Thanks and Regards,
Chandu
 
[collapse]
From: Valeriy Bashkatov [mailto:bounce-Arelav2@community.progress.com]
Sent: Thursday, April 09, 2015 2:22 PM
To: TU.OE.RDBMS@community.progress.com
Subject: [Technical Users - OE RDBMS] OpenEdge 11.5 ODBC pgoe27.so Segmentation fault
 
Thread created by Valeriy Bashkatov

Hello,

OS: CentOS
Linux 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686 i686 i386 GNU/Linux

OpenEdge:
Progress OpenEdge Release 11.5 build 1114 on Linux

PHP: 5.3.3

When attempting to connect to the database from PHP this program does not work:

<?PHP
 
$dsn = "Progress";
 
putenv("LD_LIBRARY_PATH=/usr/dlc/odbc/lib:/usr/dlc/lib");
putenv("ODBCINI=/etc/odbc.ini");
 
Print "Test ODBC Progress <br>";
 
$sql="SELECT * FROM PUB.Customer";
if ($conn_id=odbc_connect("Progress","sysprogress","123", SQL_CUR_USE_ODBC)){
echo "connected to DSN: $dsn <br>";
if($result=odbc_do($conn_id, $sql)) {
echo "executing '$sql'";
echo " Results: ";
odbc_result_all($result, "BGCOLOR='#AAFFAA' border=3 width=30% bordercolordark='#FF0000'");
echo "freeing result";
odbc_free_result($result);
}else{
echo "can not execute '$sql' ";
}
echo " closing connection $conn_id";
odbc_close($conn_id);
}else{
echo " can not connect to DSN: $dsn ";
}
?>


But it works on the OpenEdge 10.2B.

I checked the session by the debugger and I see:

gdb httpd /tmp/core.24452
...
Core was generated by `/usr/sbin/httpd'.
Program terminated with signal 11, Segmentation fault.
#0  0x01174c89 in SQLGetInfoW () from /usr/dlc/odbc/lib/pgoe27.so

Has anyone had the same error in OpenEdge 11.5?
How can I fix it?

Stop receiving emails on this subject.

Flag this post as spam/abuse.

[/collapse]

Posted by Paul Koufalis on 09-Apr-2015 08:31

A few points:

1. pgoe27.so is there since 10.2B08. Before that it was pgoe1023.so. Can you confirm which pgoe you were using before?

2. I had a similar issue going from PHP 5.3.3 to 5.5/5.6 and it turned out to be a PHP bug. We downloaded the Zend distribution of PHP and the problem went away.

3. Progress ships with an example ODBC program in $DLC/odbc/samples/example. Try the same ODBC query using the example code. If it works then it's probably a PHP issue.

Posted by Valeriy Bashkatov on 10-Apr-2015 03:16

[quote user="Paul Koufalis"]

1. pgoe27.so is there since 10.2B08. Before that it was pgoe1023.so. Can you confirm which pgoe you were using before?

[/quote]

Version of OpenEdge where test.php worked is 10.2B without SP. Yes, it use pgoe1023.so.

[quote user="Paul Koufalis"]

2. I had a similar issue going from PHP 5.3.3 to 5.5/5.6 and it turned out to be a PHP bug. We downloaded the Zend distribution of PHP and the problem went away.

[/quote]
It's weird for me because OpenEdge 10.2B and OpenEdge 11.5 Installing on the same machine. 
Thus there all the same including PHP version. The differences only in OpenEdge versions.

[quote user="Paul Koufalis"]

3. Progress ships with an example ODBC program in $DLC/odbc/samples/example. Try the same ODBC query using the example code. If it works then it's probably a PHP issue.

[/quote]

Hm... it works. It also works through isql. But this still strange for me and not understandable why with OE10.2B (no SP) PHP works, but with OE 11.5 with the same PHP it not work (?!?)

Posted by Valeriy Bashkatov on 10-Apr-2015 04:56

Additional info.

With pgoe1023.so (from 10.2B) and  OpenEdge 11.5 database connection is successful. So I think that problem in ODBC, namely in pgoe27.so

Posted by Paul Koufalis on 10-Apr-2015 06:57

Since it worked with the ODBC sample you need to try with PHP 5.6. Maybe DataDirect *fixed* a bug from pgoe23 to pgoe27.

Again, we hit a similar bug so we directly downloaded the distribution from Zend and not php. IIRC the PHP bug was introduced in 5.5 (no bug in 5.3) where if the first field in the SELECT was CHAR then it treated all the fields as CHAR, so you couldn't do something like "SELECT fChar, fChar, fInt FROM ..."

Posted by Valeriy Bashkatov on 10-Apr-2015 07:34

Ok. I'll look in that direction. Thank you!

This thread is closed