I am connected to the database, i wrote the following programm to connect:
<?php //connect.php
putenv("ODBCINI=/etc/odbc.ini");
putenv("OPL_LICENSE_DIR=/m/openlink/bin");
putenv("LD_LIBRARY_PATH=/m/openlink/lib:/m/progress91e/dlc/lib");
putenv("OPENLINKINI=/m/openlink/bin/openlink.ini");
putenv("ODBCINSTINI=/etc/odbcinst.ini");
putenv("LD_ASSUME_KERNEL=2.4.1");
/*verbinding maken met progress database */
$connect_id = odbc_pconnect("MyDb","SYSTEEM","SYSTEEM","SQL_CUR_USE_ODBC");
if (!$connect_id)
{
echo "Unable to connect to Progress database<br>";
}
else
{
echo "connected to progress";
}
?>
and when i Call this programm it says connected to progress.
this is my programm:
<?php
require("connect.php");
$ifx_sql = "Select cd_hfdmapnr from PUB.\"ep-100\";
$sql_result = odbc_do($connect_id, $ifx_sql);
$num_fields=odbc_num_fields($sql_result);
if($num_fields>0)
{
while(odbc_fetch_row($sql_result))
{
echo $dossier = odbc_result($sql_result,1);
echo $ref_opdr = addslashes(odbc_result($sql_result,2));
}
}
?>
The reason that i know that i am well connected is that when i execute the programm from the command line like: php getdata.php
it works, but when i call the getdata in my webbrowser i get a segmentationfault (11)