【问题标题】:FAILED to Install PDO through WHM通过 WHM 安装 PDO 失败
【发布时间】:2017-05-02 11:06:12
【问题描述】:

我很难在 php 5.6 上安装 oauth,但可以轻松地将其安装在 php 7.0 上,因此我将 php 版本更改为 7。太好了!但是 PDO 不再工作了。

我尝试使用 WHM(“PHP Pecl”安装程序)安装它,但失败了。

服务器信息:CENTOS 6.8 x86_64 kvm – 服务器 WHM 60.0(内部版本 28)

谢谢!

PDO (1.0.3)

WARNING: "pecl/PDO" is deprecated in favor of "channel://http://svn.php.net/viewvc/php/php-src/trunk/ext/pdo//ext/PDO"
downloading PDO-1.0.3.tgz ...
Starting to download PDO-1.0.3.tgz (52,613 bytes)
.............done: 52,613 bytes
12 source files, building
running: phpize
Configuring for:
PHP Api Version:         20151012
Zend Module Api No:      20151012
Zend Extension Api No:   320151012
building in /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3
running: /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/configure --with-php-config=/opt/cpanel/ea-php70/root/usr/bin/php-config
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for a sed that does not truncate output... /bin/sed
checking for cc... cc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether cc accepts -g... yes
checking for cc option to accept ISO C89... none needed
checking how to run the C preprocessor... cc -E
checking for icc... no
checking for suncc... no
checking whether cc understands -c and -o together... yes
checking for system library directory... lib
checking if compiler supports -R... no
checking if compiler supports -Wl,-rpath,... yes
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking target system type... x86_64-unknown-linux-gnu
checking for PHP prefix... /opt/cpanel/ea-php70/root/usr
checking for PHP includes... -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib
checking for PHP extension directory... /opt/cpanel/ea-php70/root/usr/lib64/php/modules
checking for PHP installed headers prefix... /opt/cpanel/ea-php70/root/usr/include/php
checking if debug is enabled... no
checking if zts is enabled... no
checking for re2c... no
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
checking for gawk... gawk
checking whether to enable PDO support... yes, shared
checking for a sed that does not truncate output... (cached) /bin/sed
checking for fgrep... /bin/grep -F
checking for ld used by cc... /usr/bin/ld
checking if the linker (/usr/bin/ld) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 1966080
checking whether the shell understands some XSI constructs... yes
checking whether the shell understands "+="... yes
checking for /usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for ar... ar
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from cc object... ok
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if cc supports -fno-rtti -fno-exceptions... no
checking for cc option to produce PIC... -fPIC -DPIC
checking if cc PIC flag -fPIC -DPIC works... yes
checking if cc static flag -static works... yes
checking if cc supports -c -o file.o... yes
checking if cc supports -c -o file.o... (cached) yes
checking whether the cc linker (/usr/bin/ld -m elf_x86_64) supports shared libraries... yes
checking whether -lc should be explicitly linked in... no
checking dynamic linker characteristics... GNU/Linux ld.so
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
configure: creating ./config.status
config.status: creating config.h
config.status: executing libtool commands
running: make
/bin/sh /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3/libtool --mode=compile cc  -I. -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO -DPHP_ATOM_INC -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3/include -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3/main -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib  -DHAVE_CONFIG_H  -g -O2   -c /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c -o pdo.lo
libtool: compile:  cc -I. -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO -DPHP_ATOM_INC -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3/include -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/pear-build-rootB7oQlL/PDO-1.0.3/main -I/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO -I/opt/cpanel/ea-php70/root/usr/include/php -I/opt/cpanel/ea-php70/root/usr/include/php/main -I/opt/cpanel/ea-php70/root/usr/include/php/TSRM -I/opt/cpanel/ea-php70/root/usr/include/php/Zend -I/opt/cpanel/ea-php70/root/usr/include/php/ext -I/opt/cpanel/ea-php70/root/usr/include/php/ext/date/lib -DHAVE_CONFIG_H -g -O2 -c /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c  -fPIC -DPIC -o .libs/pdo.o
In file included from /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:32:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h: In function 'pdo_attr_lval':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:191: error: too many arguments to function 'zend_hash_index_find'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:192: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_types.h:326: note: expected 'const struct zval *' but argument is of type 'struct zval **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:192: warning: passing argument 1 of 'convert_to_long' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_operators.h:244: note: expected 'struct zval *' but argument is of type 'struct zval **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h: In function 'pdo_attr_strval':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:201: error: too many arguments to function 'zend_hash_index_find'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:202: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_types.h:326: note: expected 'const struct zval *' but argument is of type 'struct zval **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:202: warning: passing argument 1 of 'zval_get_type' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_types.h:326: note: expected 'const struct zval *' but argument is of type 'struct zval **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:202: warning: passing argument 1 of '_convert_to_string' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_operators.h:243: note: expected 'struct zval *' but argument is of type 'struct zval **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_driver.h:203: warning: passing argument 1 of '_estrndup' makes pointer from integer without a cast
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_alloc.h:85: note: expected 'const char *' but argument is of type 'int'
In file included from /opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:33:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_int.h: At top level:
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_int.h:34: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pdo_dbh_new'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_int.h:39: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pdo_dbstmt_new'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/php_pdo_int.h:48: error: expected '=', ',', ';', 'asm' or '__attribute__' before 'pdo_row_new'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'php_pdo_get_exception_base':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:68: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:154: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:68: error: too many arguments to function 'zend_hash_find'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'zif_pdo_drivers':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:96: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:171: note: expected 'HashPosition *' but argument is of type 'void **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:96: error: too many arguments to function 'zend_hash_get_current_data_ex'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:97: error: too many arguments to function 'add_next_index_stringl'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'php_pdo_register_driver':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:165: warning: passing argument 2 of 'zend_hash_exists' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:159: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:165: error: too many arguments to function 'zend_hash_exists'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:171:41: error: macro "zend_hash_add" passed 6 arguments, but takes just 3
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:170: error: 'zend_hash_add' undeclared (first use in this function)
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:170: error: (Each undeclared identifier is reported only once
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:170: error: for each function it appears in.)
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'php_pdo_unregister_driver':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:176: warning: passing argument 2 of 'zend_hash_exists' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:159: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:176: error: too many arguments to function 'zend_hash_exists'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:180: warning: passing argument 2 of 'zend_hash_del' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:146: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:180: error: too many arguments to function 'zend_hash_del'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'pdo_find_driver':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:187: warning: passing argument 2 of 'zend_hash_find' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:154: note: expected 'struct zend_string *' but argument is of type 'char *'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:187: error: too many arguments to function 'zend_hash_find'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'zm_startup_pdo':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:323: error: too many arguments to function 'zend_register_internal_class_ex'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c: In function 'zm_info_pdo':
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:371: warning: passing argument 2 of 'zend_hash_get_current_data_ex' from incompatible pointer type
/opt/cpanel/ea-php70/root/usr/include/php/Zend/zend_hash.h:171: note: expected 'HashPosition *' but argument is of type 'void **'
/opt/cpanel/ea-php70/root/usr/var/tmp/php-pear/PDO/pdo.c:371: error: too many arguments to function 'zend_hash_get_current_data_ex'
make: *** [pdo.lo] Error 1
ERROR: `make' failed

【问题讨论】:

  • 我有同样的问题,使用简单的 apache 4 管理器似乎为我的 php7.2 安装了 pdo,但我的 php 脚本返回 pdo 未知。

标签: php linux pdo centos6 whm


【解决方案1】:

如果您有 EasyApache4,则无需编译 PDO 模块。您可以通过 EasyApache 安装它。选择当前配置文件并检查您当前 php 版本的 pdo 模块。您可以为所有 php 版本 5.x、5.6.x 7.x 选择 PDO

如果您有 EasyApache3,您可以使用 WHM 中的 EasyApache 部分重新编译 apache + php。然后在 php 模块上,您可以自定义您的 php 安装,您可以为 php 选择 PDO 扩展/模块。 EasyApache 将构建 php(您选择的版本)以及您选择在您的 EasyApache 配置文件中启用的所有模块

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多