草庐IT

php - 每当 PHP 在 Fedora 20 中启动时,pdo_odbc.so 中的 pdo_parse_params 错误

coder 2024-01-03 原文

当我尝试通过命令行启动 PHP 时出现此错误:

PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/pdo_odbc.so' - /usr/lib64/php/modules/pdo_odbc.so: undefined symbol: pdo_parse_params in Unknown on line 0

这是我安装的 PHP 包:

php.x86_64                      5.5.7-1.fc20        @updates                    
php-ZendFramework.noarch        1.12.3-3.fc20       @updates                    
php-bcmath.x86_64               5.5.7-1.fc20        @updates                    
php-cli.x86_64                  5.5.7-1.fc20        @updates                    
php-common.x86_64               5.5.7-1.fc20        @updates                    
php-devel.x86_64                5.5.7-1.fc20        @updates                    
php-gd.x86_64                   5.5.7-1.fc20        @updates                    
php-mcrypt.x86_64               5.5.7-1.fc20        @updates                    
php-mssql.x86_64                5.5.7-1.fc20        @updates                    
php-odbc.x86_64                 5.5.7-1.fc20        @updates                    
php-pdo.x86_64                  5.5.7-1.fc20        @updates                    
php-pear.noarch                 1:1.9.4-23.fc20     @fedora                     
php-pecl-jsonc.x86_64           1.3.3-1.fc20        @updates                    
php-pecl-jsonc-devel.x86_64     1.3.3-1.fc20        @updates                    
php-process.x86_64              5.5.7-1.fc20        @updates                    
php-xml.x86_64                  5.5.7-1.fc20        @updates

我有 extension=pdo_odbc.soextension=oci8.so 作为我的 /etc/php.ini 中定义的唯一扩展文件。 /etc/php.d 目录中还有很多 .ini 文件,用于加载大多数其他扩展。以下 .so 文件位于 /usr/lib64/php/modules 目录中:

-rwxr-xr-x. 1 root root   32560 Dec 10 23:51 bcmath.so
-rwxr-xr-x. 1 root root   24696 Dec 10 23:51 bz2.so
-rwxr-xr-x. 1 root root   33752 Dec 10 23:51 calendar.so
-rwxr-xr-x. 1 root root   15568 Dec 10 23:51 ctype.so
-rwxr-xr-x. 1 root root   86912 Dec 10 23:51 curl.so
-rwxr-xr-x. 1 root root  180608 Dec 10 23:51 dom.so
-rwxr-xr-x. 1 root root   65496 Dec 10 23:51 exif.so
-rwxr-xr-x. 1 root root 2713328 Dec 10 23:51 fileinfo.so
-rwxr-xr-x. 1 root root   53624 Dec 10 23:51 ftp.so
-rwxr-xr-x. 1 root root  120904 Dec 10 23:51 gd.so
-rwxr-xr-x. 1 root root   15640 Dec 10 23:51 gettext.so
-rwxr-xr-x. 1 root root   45080 Dec 10 23:51 iconv.so
-rwxr-xr-x. 1 root root   40840 Dec 12 09:13 json.so
-rwxr-xr-x. 1 root root   45256 Dec 10 23:51 mcrypt.so
-rwxr-xr-x. 1 root root   53816 Dec 10 23:51 mssql.so
-rwxr-xr-x. 1 root root  560751 Jan 10 10:20 oci8.so
-rwxr-xr-x. 1 root root   70312 Dec 10 23:51 odbc.so
-rwxr-xr-x. 1 root root   25008 Dec 10 23:51 pdo_dblib.so
-rwxr-xr-x. 1 root root   28856 Dec 10 23:51 pdo_odbc.so
-rwxr-xr-x. 1 root root  116240 Dec 10 23:51 pdo.so
-rwxr-xr-x. 1 root root   29168 Dec 10 23:51 pdo_sqlite.so
-rwxr-xr-x. 1 root root  272000 Dec 10 23:51 phar.so
-rwxr-xr-x. 1 root root   32880 Dec 10 23:51 posix.so
-rwxr-xr-x. 1 root root   15624 Dec 10 23:51 shmop.so
-rwxr-xr-x. 1 root root   54176 Dec 10 23:51 simplexml.so
-rwxr-xr-x. 1 root root   91368 Dec 10 23:51 sockets.so
-rwxr-xr-x. 1 root root   51336 Dec 10 23:51 sqlite3.so
-rwxr-xr-x. 1 root root   19880 Dec 10 23:51 sysvmsg.so
-rwxr-xr-x. 1 root root   11496 Dec 10 23:51 sysvsem.so
-rwxr-xr-x. 1 root root   15720 Dec 10 23:51 sysvshm.so
-rwxr-xr-x. 1 root root   19712 Dec 10 23:51 tokenizer.so
-rwxr-xr-x. 1 root root   36720 Dec 10 23:51 wddx.so
-rwxr-xr-x. 1 root root   32888 Dec 10 23:51 xmlreader.so
-rwxr-xr-x. 1 root root   54072 Dec 10 23:51 xml.so
-rwxr-xr-x. 1 root root   49152 Dec 10 23:51 xmlwriter.so
-rwxr-xr-x. 1 root root   37104 Dec 10 23:51 xsl.so

可以找到我运行 phpinfo() 时的输出 here .

/etc/php.d 中 pdo_odbc.ini 的内容:

; Enable pdo_odbc extension module
extension=pdo_odbc.so

readelf -Ws pdo_odbc.so 的输出:

Symbol table '.dynsym' contains 83 entries:
   Num:    Value          Size Type    Bind   Vis      Ndx Name
     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND 
     1: 0000000000001ac0     0 SECTION LOCAL  DEFAULT    9 
     2: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND convert_to_long
     3: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND pdo_parse_params
     4: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_pdo_unregister_driver
     5: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND free@GLIBC_2.2.5 (2)
     6: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strcasecmp@GLIBC_2.2.5 (2)
     7: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_deregisterTMCloneTable
     8: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLParamData
     9: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND cfg_get_string
    10: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLRowCount
    11: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _estrdup
    12: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strlen@GLIBC_2.2.5 (2)
    13: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLFreeHandle
    14: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLFetchScroll
    15: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __stack_chk_fail@GLIBC_2.4 (3)
    16: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _zval_dtor_func
    17: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLDriverConnect
    18: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLPutData
    19: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND zend_fetch_resource
    20: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strchr@GLIBC_2.2.5 (2)
    21: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_info_print_table_row
    22: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _php_stream_stat
    23: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLGetDiagRec
    24: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLDescribeCol
    25: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _erealloc
    26: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_pdo_get_exception
    27: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND zend_hash_index_find
    28: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND zend_declare_class_constant_long
    29: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND __gmon_start__
    30: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLCloseCursor
    31: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLSetEnvAttr
    32: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_error_docref0
    33: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_info_print_table_end
    34: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _safe_malloc
    35: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND memcpy@GLIBC_2.14 (4)
    36: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLConnect
    37: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND zend_throw_exception_ex
    38: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_file_le_stream
    39: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLDescribeParam
    40: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_info_print_table_header
    41: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_pdo_register_driver
    42: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLColAttribute
    43: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_pdo_get_dbh_ce
    44: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLPrepare
    45: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _ecalloc
    46: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLSetConnectAttr
    47: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND __strcpy_chk@GLIBC_2.3.4 (5)
    48: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _convert_to_string
    49: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLExecute
    50: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _efree
    51: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLExecDirect
    52: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND zval_is_true
    53: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLSetCursorName
    54: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLDisconnect
    55: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _Jv_RegisterClasses
    56: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _php_stream_read
    57: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND add_next_index_string
    58: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _estrndup
    59: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLEndTran
    60: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _emalloc
    61: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLNumResultCols
    62: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLGetData
    63: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_file_le_pstream
    64: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND _zval_copy_ctor_func
    65: 0000000000000000     0 NOTYPE  WEAK   DEFAULT  UND _ITM_registerTMCloneTable
    66: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLBindParameter
    67: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLGetCursorName
    68: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND add_next_index_long
    69: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLSetStmtAttr
    70: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLAllocHandle
    71: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND php_info_print_table_start
    72: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLBindCol
    73: 0000000000000000     0 FUNC    WEAK   DEFAULT  UND __cxa_finalize@GLIBC_2.2.5 (2)
    74: 0000000000000000     0 NOTYPE  GLOBAL DEFAULT  UND spprintf
    75: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND strstr@GLIBC_2.2.5 (2)
    76: 0000000000000000     0 FUNC    GLOBAL DEFAULT  UND SQLMoreResults
    77: 0000000000206438     0 NOTYPE  GLOBAL DEFAULT   23 _edata
    78: 0000000000206440     0 NOTYPE  GLOBAL DEFAULT   24 _end
    79: 0000000000002310     8 FUNC    GLOBAL DEFAULT   11 get_module
    80: 0000000000206438     0 NOTYPE  GLOBAL DEFAULT   24 __bss_start
    81: 0000000000001ac0     0 FUNC    GLOBAL DEFAULT    9 _init
    82: 00000000000045a4     0 FUNC    GLOBAL DEFAULT   12 _fini

最佳答案

解决我的问题的方法是从 /etc/php.ini 中删除行 extension=pdo_odbc.so

pdo_odbc.so 扩展被导入到 /etc/php.d/pdo_odbc.ini 文件中,该文件也有 extension=pdo_odbc.so 在里面。

Explanation

关于php - 每当 PHP 在 Fedora 20 中启动时,pdo_odbc.so 中的 pdo_parse_params 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21190058/

有关php - 每当 PHP 在 Fedora 20 中启动时,pdo_odbc.so 中的 pdo_parse_params 错误的更多相关文章

  1. ruby - 在院子里用@param 标签警告 - 2

    我试图使用yard记录一些Ruby代码,尽管我所做的正是所描述的here或here#@param[Integer]thenumberoftrials(>=0)#@param[Float]successprobabilityineachtrialdefinitialize(n,p)#initialize...end虽然我仍然得到这个奇怪的错误@paramtaghasunknownparametername:the@paramtaghasunknownparametername:success然后生成的html看起来很奇怪。我称yard为:$yarddoc-mmarkdown我做错了什么?

  2. ruby parslet : parsing multiple lines - 2

    我正在寻找一种匹配多行Parslet的方法。代码如下所示:rule(:line){(match('$').absent?>>any).repeat>>match('$')}rule(:lines){line.repeat}但是,lines将始终以无限循环结束,这是因为match('$')将无休止地重复以匹配字符串的结尾。是否可以匹配可以为空的多行?irb(main)>lines.parse($stdin.read)Thisisamultilinestring^D应该匹配成功。我错过了什么吗?我还尝试了(match('$').absent?>>any.maybe).repeat(1)>>

  3. ruby - 允许主机名包含下划线的 URI.parse 的替代方法 - 2

    我正在使用DMOZ的listofurltopics,其中包含一些具有包含下划线的主机名的url。例如:608609TheOuterHeaven610InformationandimagegalleryofMcFarlane'sactionfiguresforTrigun,Akira,TenchiMuyoandotherJapaneseSci-Fianimations.611Top/Arts/Animation/Anime/Collectibles/Models_and_Figures/Action_Figures612虽然此url可以在网络浏览器中使用(或者至少在我的浏览器中可以使用:

  4. ruby-on-rails - Rails参数,为什么params[ :key] syntax? - 2

    我正在尝试手动创建一些参数以传递给RailsController函数,为什么参数散列的键用冒号列出,例如params[:key]而不是params["key"]? 最佳答案 Rails使用ActiveSupport’sHashWithIndifferentAccess对于几乎所有来自其自身的哈希值,例如params。HashWithIndifferentAccess的行为与常规哈希相同,除了通过符号或具有相同“值”的字符串进行键访问会返回相同的哈希值。例如:h=HashWithIndifferentAccess.newh[:foo]

  5. ruby-on-rails - 这个 C 和 PHP 程序员如何学习 Ruby 和 Rails? - 2

    按照目前的情况,这个问题不适合我们的问答形式。我们希望答案得到事实、引用或专业知识的支持,但这个问题可能会引发辩论、争论、投票或扩展讨论。如果您觉得这个问题可以改进并可能重新打开,visitthehelpcenter指导。关闭9年前。我来自C、php和bash背景,很容易学习,因为它们都有相同的C结构,我可以将其与我已经知道的联系起来。然后2年前我学了Python并且学得很好,Python对我来说比Ruby更容易学。然后从去年开始,我一直在尝试学习Ruby,然后是Rails,我承认,直到现在我还是学不会,讽刺的是那些打着简单易学的烙印,但是对于我这样一个老练的程序员来说,我只是无法将它

  6. ruby-on-rails - 每当 gem : I set :output but the logfile doesn't show up where I'd expect it to - 2

    在我的schedule.rb文件中,我有以下几行:set:output,'/log/cron_log.log'every5.minutesdocommand'echo"hello"'end我按照这个问题Rails,usingwhenevergemindevelopment中的建议运行了whenever-w,并且我假设cronfile已编写并正在运行。(我也尝试重新启动Rails服务器。)当我运行$crontab-l时,我看到以下内容:0,5,10,15,20,25,30,35,40,45,50,55****/bin/bash-l-c'echo"hello">>/log/cron_log

  7. ruby - 如何强制 Rack :session + sinatra to read "rack.session" from params instead of cookies - 2

    我正在处理oauth1.0(twitter和flickr)。网站工作在80端口,oauth服务器工作在8080端口算法:向oauth服务器发送ajax请求以检查用户是否有有效的access_token如果用户没有access_token或access_token已过期,则打开授权窗口在oauth服务器的用户session中保存access_token发送分享数据到oauth服务器它使用sinatra+rack:session+rack::session::sequel+sqlite来存储session。它在每个响应中发送Set-Cookie:rack.session=id我正在使用2种

  8. ruby-on-rails - Rails 4.1.2 - to_param 转义斜杠(并破坏应用程序) - 2

    我在我的应用程序中使用to_param创建自定义URL(此自定义路径包含斜杠):classMachine问题是,自从Rails4.1.2行为发生变化并且Rails不允许在URL中使用斜线(当使用自定义URL时),所以它转义了斜线。我有这样的路线:Rails.application.routes.drawdoscope"(:locale)",locale:/#{I18n.available_locales.join("|")}/doresources:machines,except::destroydocollectiondoget:searchget'search/:ad_type(/

  9. ruby-on-rails - Ruby on Rails 3: Devise::LdapAdapter.get_ldap_param 未定义方法错误 - 2

    我正在运行:ruby1.9.3p0,rails3.1.1,设计1.4.9,Devise_ldap_authenticatable0.4.10我正在使用Devise通过ldap服务器验证我的Rails应用程序。我使用用户名而不是电子邮件进行身份验证,所以我表中的电子邮件字段自然是空白的。在ldap中查询email,官方的做法是在用户模型中加入这段代码:before_save:get_ldap_emaildefget_ldap_emailself.email=Devise::LdapAdapter.get_ldap_param(self.username,"mail")end这段代码失败了

  10. ruby - 名称错误 : undefined - have parsing rules for local variables changed in Ruby 2. 1.2? - 2

    我得到NameError:undefinedlocalvariableormethodwithruby​​2.1.2正如在thisquestion中观察到的那样,表达式如:barifbar=true引发未定义的局部变量错误(前提是bar之前未定义),因为bar在分配之前被解析器读取。而且我相信以前用这个表达式没有什么区别:barifbar=false两者之间的区别在于主体是否被求值,但如果遇到未定义的局部变量会在求值条件之前立即引发错误,那应该无关紧要。但是当我在Ruby2.1.2上运行第二个代码时,它没有引发错误。以前也是这样吗?如果是这样,那么解析讨论的内容是什么?如果没有,Rub

随机推荐