Unhandled exception when PHP/Sybase

wxdqz

New Member
I am using PHP 4.0.5 with an Win NT 4.0 SP6 as ISAPI module in the IIS 4.0 web server.
Also I have installed in the same machine Sybase ASE 12.0. According what I have been finding it is very hard to get working PHP with sybase in an NT environment but if you can get the warning "Sybase: Server message: Changed database context to 'db_name' (severity 10, procedure N/A) in C:\.. " your connection was successful. My problem is that as soon as I get the above warning the message "PHP has encountered an Unhandled Exception Code -1073741674 at 01228CC4" appears and the PHP script stop executing; I have trying below code using ODBC library and everithing works great, but I need to use the sybase library because I will deploy the scripts in a Solaris environment.
Any suggestions to work around this problem.


<?php echo "Process Started !!!! <BR>" ?>
<?php
echo "connecting to sybase using library sybase_ct.dll";
$Sy_ID = sybase_connect("Server_Name", "usr_name", "usr_pwd");
echo("Resource Id $Sy_ID <BR>" );
echo("changing to another database");
sybase_select_db("db_name", $Sy_ID);
echo("making the query");
$Sy_RID = sybase_query('select ID, name, price from prueba', $Sy_ID);
echo("gathering results");
$result = sybase_fetch_row($Sy_RID);
echo("showing results");
while (list($ID, $name, $price) = each($result)){
echo($ID . " " . $name . " " . $price);
}
echo("closing resource");
sybase_close($Sy_ID);

echo "connecting to sybase using ODBC library";
?>
 
Back
Top