我目前正在使odbc_connect在我的CentOS服务器上工作.我已经安装了Easysoft ODBC-sql-Server驱动程序,目的是连接到Microsoft sql Server 2012.
原文链接:https://www.f2er.com/centos/373988.html我收到错误:
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
没有输出.