CentOS 6上的php – odbc_connect()

前端之家收集整理的这篇文章主要介绍了CentOS 6上的php – odbc_connect()前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我目前正在使odbc_connect在我的CentOS服务器上工作.我已经安装了Easysoft ODBC-sql-Server驱动程序,目的是连接到Microsoft sql Server 2012.

我收到错误

PHP Fatal error: Call to undefined function odbc_connect()

使用odbc_connect()时.

> ls /etc/PHP.d
> curl.ini      json.ini  pdo.ini       pdo_sqlite.ini  sqlite3.ini
> fileinfo.ini  odbc.ini  pdo_odbc.ini  phar.ini        zip.ini
> cat pdo_odbc.ini ; 
> Enable pdo_odbc
> extension module extension=pdo_odbc.so

我已经安装了包PHP-odbc并重新启动了我的服务器,还有什么我需要做的,以确保PHP访问odbc方法

更新

PHP --ini

指着

/usr/local/lib/PHP.ini

哪个没有提到ODBC.

运行命令“

PHP -i |grep ini

得到:

Configuration File (PHP.ini) Path => /usr/local/lib
Loaded Configuration File => /usr/local/lib/PHP.ini
Scan this dir for additional .ini files => (none)
Additional .ini files parsed => (none)
user_ini.cache_ttl => 300 => 300
user_ini.filename => .user.ini => .user.ini
init_command_executed_count => 0
init_command_Failed_count => 0
com_init_db => 0
Classes => AppendIterator,ArrayIterator,ArrayObject,BadFunctionCallException,BadMethodCallException,CachingIterator,CallbackFilterIterator,DirectoryIterator,DomainException,EmptyIterator,FilesystemIterator,FilterIterator,GlobIterator,InfiniteIterator,InvalidArgumentException,IteratorIterator,LengthException,LimitIterator,LogicException,MultipleIterator,NoRewindIterator,OutOfBoundsException,OutOfRangeException,OverflowException,ParentIterator,RangeException,RecursiveArrayIterator,RecursiveCachingIterator,RecursiveCallbackFilterIterator,RecursiveDirectoryIterator,RecursiveFilterIterator,RecursiveIteratorIterator,RecursiveRegexIterator,RecursiveTreeIterator,RegexIterator,RuntimeException,SplDoublyLinkedList,SplFileInfo,SplFileObject,SplFixedArray,SplHeap,SplMinHeap,SplMaxHeap,SplObjectStorage,SplPriorityQueue,SplQueue,SplStack,SplTempFileObject,UnderflowException,UnexpectedValueException
open sourced by => Epinions.com

命令

nm /usr/local/bin/PHP |grep odbc

没有输出.

确保您正在使用正确的PHP配置.

运行以下命令来知道正确的odbc ini文件

PHP --ini
原文链接:https://www.f2er.com/centos/373988.html

猜你在找的CentOS相关文章