2014-10-01 3 views
1

Я пытаюсь обновить все мои серверы до php 5.6 в настоящее время, и это пошло отлично, за исключением установки oci8. Он отлично работал с php55, и я даже снял новый бродячий бокс с centos, чтобы проверить его и убедиться, что это полностью чистая установка.Pecl oci8 не удалось установить после обновления до PHP5.6

Когда я пытаюсь запустить установку, я получаю следующие ошибки.

# pecl install oci8 
downloading oci8-2.0.8.tgz ... 
Starting to download oci8-2.0.8.tgz (190,854 bytes) 
.........................................done: 190,854 bytes 
11 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20131106 
Zend Module Api No:  20131226 
Zend Extension Api No: 220131226 
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : 
building in /var/tmp/pear-build-rootMIYqiX/oci8-2.0.8 
running: /var/tmp/oci8/configure --with-oci8 
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... /usr 
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib 
checking for PHP extension directory... /usr/lib64/php/modules 
checking for PHP installed headers prefix... /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 for Oracle Database OCI8 support... yes, shared 
checking PHP version... 5.6.0, ok 
checking OCI8 DTrace support... no 
checking size of long int... 8 
checking checking if we're on a 64-bit platform... yes 
configure: WARNING: OCI8 extension: ORACLE_HOME is not set, looking for default Oracle Instant Client instead 
checking Oracle Instant Client directory... /usr/lib/oracle/11.2/client64/lib 
checking Oracle Instant Client SDK header directory... /usr/include/oracle/11.2/client64 
checking Oracle Instant Client library version compatibility... 11.1 
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 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... no 
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 /var/tmp/pear-build-rootMIYqiX/oci8-2.0.8/libtool --mode=compile cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootMIYqiX/oci8-2.0.8/include -I/var/tmp/pear-build-rootMIYqiX/oci8-2.0.8/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -o oci8.lo 
libtool: compile: cc -I. -I/var/tmp/oci8 -DPHP_ATOM_INC -I/var/tmp/pear-build-rootMIYqiX/oci8-2.0.8/include -I/var/tmp/pear-build-rootMIYqiX/oci8-2.0.8/main -I/var/tmp/oci8 -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/include/oracle/11.2/client64 -DHAVE_CONFIG_H -g -O2 -c /var/tmp/oci8/oci8.c -fPIC -DPIC -o .libs/oci8.o 
In file included from /var/tmp/oci8/oci8.c:46: 
/var/tmp/oci8/php_oci8_int.h:48:29: error: oci8_dtrace_gen.h: No such file or directory 
make: *** [oci8.lo] Error 1 
ERROR: `make' failed 

Так выглядит, что проблема с DTRACE. Я огляделся и обнаружил, что это изменение, внесенное в php56 и включить его вам нужно запустить ...

export PHP_DTRACE=yes 

После запуска pecl install oci8 снова я теперь получаю это.

# pecl install oci8 
downloading oci8-2.0.8.tgz ... 
Starting to download oci8-2.0.8.tgz (190,854 bytes) 
.........................................done: 190,854 bytes 
11 source files, building 
running: phpize 
Configuring for: 
PHP Api Version:   20131106 
Zend Module Api No:  20131226 
Zend Extension Api No: 220131226 
Please provide the path to the ORACLE_HOME directory. Use 'instantclient,/path/to/instant/client/lib' if you're compiling with Oracle Instant Client [autodetect] : 
building in /var/tmp/pear-build-rootIwscfS/oci8-2.0.8 
running: /var/tmp/oci8/configure --with-oci8 
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... /usr 
checking for PHP includes... -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib 
checking for PHP extension directory... /usr/lib64/php/modules 
checking for PHP installed headers prefix... /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 for Oracle Database OCI8 support... yes, shared 
checking PHP version... 5.6.0, ok 
checking OCI8 DTrace support... yes 
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 sys/sdt.h usability... no 
checking sys/sdt.h presence... no 
checking for sys/sdt.h... no 
configure: error: Cannot find sys/sdt.h which is required for DTrace support 
ERROR: `/var/tmp/oci8/configure --with-oci8' failed 

Это было проверено с помощью мгновенного клиента oracle 11.2 и мгновенного клиента 12.1. Оба с точно такими же результатами.

EDIT: Вот вся информация, которую я нашел при попытке устранить эту проблему. http://php.net/manual/en/migration56.extensions.php - Изменение PHP56 http://php.net/manual/en/oci8.dtrace.php - Включение Dtrace http://www.lornajane.net/posts/2011/downgrading-a-pecl-module - Откат версии для PECL http://pecl.php.net/package/oci8 - список версий OCI8

+0

Вы компиляции PHP, как хорошо или вы используете репо для этого? Возможно, вы сможете «yum install php-pecl-oci8» и избегать проблем с компиляцией PECL – Machavity

+0

@Machavity Я установил php56 из репозитория, поэтому это не должно быть проблемой.Я считаю, что я попытался установить yum install php-pecl-oci8, но столкнулся с другой проблемой. Я покажу новую коробку с бродягой и добавлю какие-либо детали из ее установки таким образом на этот пост. – mschuett

+0

@Machavity Я попробовал это с php-pecl-oci8 с теми же результатами. Похоже, что запуск, который фактически не устанавливает для вас мгновенного клиента oracle. – mschuett

ответ

4

Я нашел решение этого, хотя я не люблю и надеюсь, что у кого-то есть лучший. Откат к последнему стабильной версии все, кажется, работает хорошо работает ..

pecl install -f oci8-1.4.10 
+0

Было бы интересно выбрать другой ответ, но похоже, что у нас нет большого интереса к этому вопросу. Однако вышесказанное выведет вас с земли и бежит. – mschuett

8

исправить эту проблему в моем CENTOS 6.6 и PHP 5.6.8 этих двух способов:

  1. Если вам нужно Dtrace:

    • ням установить SystemTap-SDT-разви
    • экспорт PHP_DTRACE = да
    • ре ХЛ установить OCI8
  2. , если вам не нравится Dtrace:

    • Загрузить oci8 дегтя мяч и извлечь файлы
    • изменить файл 'php_oci8_int.h', изменить 48-й линии
      #include "oci8_dtrace_gen.h" к #undef HAVE_OCI8_DTRACE
    • phpize
    • ./configure --with-OCI8 =
    • сделать
    • сделать установку
+0

Вау, ты спас мой день! – Zolbayar

+1

Отлично! Это работало с CentOS 7 и PHP 7.0 –

Смежные вопросы