Ubuntu 16.04 PHP 7.0 无法与 Sybase 数据库一起使用

Ubuntu 16.04 PHP 7.0 无法与 Sybase 数据库一起使用

该包提供了操作 sybase 数据库的功能,但不提供sybase_connectPHP 函数。

软件包已安装:

renato@webv3:/var/www/html$ aptitude show php-sybase
Pacote: php-sybase
Estado: instalado
Automaticamente instalado: não
Versão: 1:7.0+35ubuntu6
Prioridade: opcional
Seção: universe/php
Mantenedor: Ubuntu Developers <[email protected]>
Arquitetura: all
Tamanho Descompactado: 11,3 k
Depende de: php-common, php7.0-sybase
Descrição: Sybase module for PHP [default]
 This package provides a Sybase module for PHP.

测试代码

<?php
$link = sybase_connect('SYBASE', '', '')
        or die("Could not connect !");
echo "Connected successfully";
sybase_close($link);
?>

显示以下错误

[Thu Jun 23 17:20:49.100056 2016] [:error] [pid 5188] [client x.x.x.x:55770] PHP Fatal error:  Uncaught Error: Call to undefined function sybase_connect() in /var/www/html/info2.php:3\nStack trace:\n#0 {main}\n  thrown in /var/www/html/info2.php on line 3

答案1

sybase_connect()功能是已删除在 PHP 7.0.0 中。

来源:http://php.net/manual/en/function.sybase-connect.php

Stack Overflow 上发布了一个答案:PHP7-连接到sybase数据库

相关内容