I have this code that I can run successfully on the command line:
<?php
echo "Testing...";
$link = sybase_connect('10.10.1.123' , 'test', 'test123');
if (!$link) {
echo "Couldn't make a connection!";
exit;
}
$db = sybase_select_db("testdb", $link);
//echo $link;
if (!$db) {
echo "Couldn't select database!";
exit;
}
$sql = 'SELECT c1 FROM t1';
$sql_result = sybase_query($sql,$link);
//echo $sql_result;
while ($row = sybase_fetch_array($sql_result)) {
$sname = $row["c1"];
echo $sname;
}
?>
However when I try to run it through the browser I get this error:
Fatal error: Call to undefined function sybase_connect() in /var/www/test/ts.php on line 3
I've tried to check both php.ini (For CLI, and Apache2) but frankly I wasn't really sure what exactly I'm looking for. I did a search for sybase on both files and everything looks the same.
Any help please?