我很难在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
答案 0 :(得分:0)
如果您有EasyApache4,则无需编译PDO模块。您可以通过EasyApache安装它。选择当前配置文件并检查pdo模块以获取当前的php版本。您可以为所有php版本5.x,5.6.x 7.x
选择PDO如果你有EasyApache3,你可以使用WHM中的EasyApache部分重新编译apache + php。然后在php模块上,你可以自定义你的php安装,你可以选择PD的PDO扩展/模块。 EasyApache将构建php(您选择的版本)以及您在EasyApache配置文件中选择启用的所有模块