<small id='Uvm4s'></small><noframes id='Uvm4s'>

    <tfoot id='Uvm4s'></tfoot>

        <i id='Uvm4s'><tr id='Uvm4s'><dt id='Uvm4s'><q id='Uvm4s'><span id='Uvm4s'><b id='Uvm4s'><form id='Uvm4s'><ins id='Uvm4s'></ins><ul id='Uvm4s'></ul><sub id='Uvm4s'></sub></form><legend id='Uvm4s'></legend><bdo id='Uvm4s'><pre id='Uvm4s'><center id='Uvm4s'></center></pre></bdo></b><th id='Uvm4s'></th></span></q></dt></tr></i><div id='Uvm4s'><tfoot id='Uvm4s'></tfoot><dl id='Uvm4s'><fieldset id='Uvm4s'></fieldset></dl></div>
        <legend id='Uvm4s'><style id='Uvm4s'><dir id='Uvm4s'><q id='Uvm4s'></q></dir></style></legend>

        • <bdo id='Uvm4s'></bdo><ul id='Uvm4s'></ul>
      1. 如何配置 php 以在 CentOS 上启用 pdo 并包含 mysqli?

        时间:2024-04-13

              <tbody id='9OYM6'></tbody>
            <legend id='9OYM6'><style id='9OYM6'><dir id='9OYM6'><q id='9OYM6'></q></dir></style></legend>
            <i id='9OYM6'><tr id='9OYM6'><dt id='9OYM6'><q id='9OYM6'><span id='9OYM6'><b id='9OYM6'><form id='9OYM6'><ins id='9OYM6'></ins><ul id='9OYM6'></ul><sub id='9OYM6'></sub></form><legend id='9OYM6'></legend><bdo id='9OYM6'><pre id='9OYM6'><center id='9OYM6'></center></pre></bdo></b><th id='9OYM6'></th></span></q></dt></tr></i><div id='9OYM6'><tfoot id='9OYM6'></tfoot><dl id='9OYM6'><fieldset id='9OYM6'></fieldset></dl></div>

            • <tfoot id='9OYM6'></tfoot>

              <small id='9OYM6'></small><noframes id='9OYM6'>

              • <bdo id='9OYM6'></bdo><ul id='9OYM6'></ul>

                  本文介绍了如何配置 php 以在 CentOS 上启用 pdo 并包含 mysqli?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

                  问题描述

                  CentOS 上的 PHP 版本 5.3.3(x86_64,RHEL 6)

                  PHP Version 5.3.3 on CentOS (x86_64, RHEL 6)

                  显然我的 PHP 安装被配置为排除 Mysqli 并出于某种原因禁用 PDO.因此,我相信当我尝试从 shell 使用 php 命令时,这就是导致它们无法工作的原因.我可以很好地通过 HTTP 加载 mysqli 和 pdo,但它们不能从 shell 工作.如何启用这些组件?这样做有什么风险?

                  Apparently my PHP installation was configured to exclude Mysqli and disable PDO for some reason. Therefore, I believe this is what's causing them to not work when I try to use the php command from the shell. I can load mysqli and pdo via HTTP just fine, but they don't work from shell. How do I enable these components and what are the risks in doing so?

                  配置命令:

                  './configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin' '--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include' '--libdir=/usr/lib64' '--libexecdir=/usr/libexec' '--localstatedir=/var' '--sharedstatedir=/var/lib' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic' '--disable-rpath' '--without-pear' '--with-bz2' '--with-exec-dir=/usr/bin' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-pcre-regex=/usr' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-kerberos' '--enable-ucd-snmp-hack' '--enable-shmop' '--enable-calendar' '--without-sqlite' '--with-libxml-dir=/usr' '--enable-xml' '--with-system-tzdata' '--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-pdo' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' 
                  

                  解析的其他 .ini 文件:

                  Additional .ini files parsed:

                  /etc/php.d/apc.ini, /etc/php.d/bcmath.ini, /etc/php.d/curl.ini, /etc/php.d/dba.ini, /etc/php.d/dom.ini, /etc/php.d/fileinfo.ini, /etc/php.d/gd.ini, /etc/php.d/imap.ini, /etc/php.d/json.ini, /etc/php.d/ldap.ini, /etc/php.d/mbstring.ini, /etc/php.d/mcrypt.ini, /etc/php.d/mysql.ini, /etc/php.d/mysqli.ini, /etc/php.d/odbc.ini, /etc/php.d/pdo.ini, /etc/php.d/pdo_mysql.ini, /etc/php.d/pdo_odbc.ini, /etc/php.d/pdo_sqlite.ini, /etc/php.d/phar.ini, /etc/php.d/snmp.ini, /etc/php.d/soap.ini, /etc/php.d/sqlite3.ini, /etc/php.d/wddx.ini, /etc/php.d/xmlreader.ini, /etc/php.d/xmlrpc.ini, /etc/php.d/xmlwriter.ini, /etc/php.d/xsl.ini, /etc/php.d/zip.ini 
                  

                  /etc/php.ini

                  /etc/php.ini

                  extension=pdo.so
                  extension=pdo_mysql.so
                  extension=pdo_sqlite.so
                  extension=mysql.so
                  

                  推荐答案

                  你可能只需要安装包.

                  yum install php-pdo php-mysqli
                  

                  安装完成后,重新启动 Apache.

                  After they're installed, restart Apache.

                  httpd restart
                  

                  apachectl restart
                  

                  这篇关于如何配置 php 以在 CentOS 上启用 pdo 并包含 mysqli?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

                  上一篇:在 CentOS 7 上使用 Apache 的多个 PHP 版本 下一篇:尽管时区有效,但设置默认时区不起作用

                  相关文章

                  <small id='hnd25'></small><noframes id='hnd25'>

                        <bdo id='hnd25'></bdo><ul id='hnd25'></ul>
                    1. <legend id='hnd25'><style id='hnd25'><dir id='hnd25'><q id='hnd25'></q></dir></style></legend>
                    2. <tfoot id='hnd25'></tfoot>

                      <i id='hnd25'><tr id='hnd25'><dt id='hnd25'><q id='hnd25'><span id='hnd25'><b id='hnd25'><form id='hnd25'><ins id='hnd25'></ins><ul id='hnd25'></ul><sub id='hnd25'></sub></form><legend id='hnd25'></legend><bdo id='hnd25'><pre id='hnd25'><center id='hnd25'></center></pre></bdo></b><th id='hnd25'></th></span></q></dt></tr></i><div id='hnd25'><tfoot id='hnd25'></tfoot><dl id='hnd25'><fieldset id='hnd25'></fieldset></dl></div>