I have followed the instructions in the article How to setup a 64 bit ODBC connection on CentOS 5 to make a connection with PHP to a 32 bit (or 64 bit if available) 11.0, 10.2B, 10.2A, 10.1C, 10.1B or 10.1A database (article 000027930).
I am able to create a connection using "isql -v read_v7demo sysprogress sysprogress" to the database, so it would seem the odbc.ini is setup correctly and the driver is working. However, it does not connect thru php. When it gets to line 4 in the code, where I am setting the ODBCINI var, it causes the page to crash (error is server has reset connection). If I comment out the driver in the odbc.ini file, I get the expected error saying driver is not found. It almost seems as though the driver causes the page to crash. Any ideas or suggestions would be greatly appreciated.
<?php
putenv("DLC=/u/progress/clientaccess");
putenv("ODBCDIR=/u/progress/clientaccess/odbc");
putenv("LD_LIBRARY_PATH=/u/progress/clientaccess/odbc/lib:/u/progress/clientaccess/lib");
putenv("ODBCINI=/etc/odbc.ini");
echo "hello<br>";
$conn=odbc_connect("read_v7demo","sysprogress","sysprogress", SQL_CUR_USE_ODBC);
if ($conn) {
echo "awesome<br>";
} else {
echo "try again " . odbc_error(). " " . odbc_errormsg();
}
?>
/etc/odbc.ini
[ODBC Data Sources]
Progress=Progress_SQL92_Driver
[read_v7demo]
Driver=/u/progress/clientaccess/odbc/lib/pgoe1025.so
DatabaseName=v7demo
PortNumber=8004
HostName=a3400
;LogonID=sysprogress
;Password=sysprogress
;APILevel=1
;ConnectFunctions=YYN
;CPTimeout=60
;DriverODBCVer=03.60
;FileUsage=0
;SQLLevel=0
;UsageCount=1
;ArraySize=50
;DefaultLongDataBuffLen=2048
DefaultIsolationLevel=REPEATABLE UNCOMMITTED
;StaticCursorLongColBuffLen=4096
:TRACE=1
:TRACEFILE=/tmp/odbctrace.out
[ODBC]
InstallDir=/u/progress/clientaccess/odbc
Trace=1
TraceFile=/tmp/odbctrace.out
TraceDll=/u/progress/clientaccess/odbc/lib/pgtrc25.so
UseCursorLib=0
Here is the article:
How to setup a 64 bit ODBC connection on CentOS 5 to make a connection with PHP to a 32 bit (or 64 bit if available) 11.0, 10.2B, 10.2A, 10.1C, 10.1B or 10.1A database.
I am able to create a connection using "isql -v read_v7demo sysprogress sysprogress" to the database, so it would seem the odbc.ini is setup correctly and the driver is working. However, it does not connect thru php. When it gets to line 4 in the code, where I am setting the ODBCINI var, it causes the page to crash (error is server has reset connection). If I comment out the driver in the odbc.ini file, I get the expected error saying driver is not found. It almost seems as though the driver causes the page to crash. Any ideas or suggestions would be greatly appreciated.
<?php
putenv("DLC=/u/progress/clientaccess");
putenv("ODBCDIR=/u/progress/clientaccess/odbc");
putenv("LD_LIBRARY_PATH=/u/progress/clientaccess/odbc/lib:/u/progress/clientaccess/lib");
putenv("ODBCINI=/etc/odbc.ini");
echo "hello<br>";
$conn=odbc_connect("read_v7demo","sysprogress","sysprogress", SQL_CUR_USE_ODBC);
if ($conn) {
echo "awesome<br>";
} else {
echo "try again " . odbc_error(). " " . odbc_errormsg();
}
?>
/etc/odbc.ini
[ODBC Data Sources]
Progress=Progress_SQL92_Driver
[read_v7demo]
Driver=/u/progress/clientaccess/odbc/lib/pgoe1025.so
DatabaseName=v7demo
PortNumber=8004
HostName=a3400
;LogonID=sysprogress
;Password=sysprogress
;APILevel=1
;ConnectFunctions=YYN
;CPTimeout=60
;DriverODBCVer=03.60
;FileUsage=0
;SQLLevel=0
;UsageCount=1
;ArraySize=50
;DefaultLongDataBuffLen=2048
DefaultIsolationLevel=REPEATABLE UNCOMMITTED
;StaticCursorLongColBuffLen=4096
:TRACE=1
:TRACEFILE=/tmp/odbctrace.out
[ODBC]
InstallDir=/u/progress/clientaccess/odbc
Trace=1
TraceFile=/tmp/odbctrace.out
TraceDll=/u/progress/clientaccess/odbc/lib/pgtrc25.so
UseCursorLib=0
Here is the article:
How to setup a 64 bit ODBC connection on CentOS 5 to make a connection with PHP to a 32 bit (or 64 bit if available) 11.0, 10.2B, 10.2A, 10.1C, 10.1B or 10.1A database.
Environment | Linux CentOS 5 64 bit |