php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #51625 php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5
Submitted: 2010-04-21 15:14 UTC Modified: 2021-09-24 14:55 UTC
Votes:15
Avg. Score:3.9 ± 1.1
Reproduced:12 of 12 (100.0%)
Same Version:3 (25.0%)
Same OS:5 (41.7%)
From: Eduards dot Samersovs at inbox dot lv Assigned:
Status: Open Package: OCI8 related
PHP Version: 5.3.2 OS: Ubuntu 9.10
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: Eduards dot Samersovs at inbox dot lv
New email:
PHP Version: OS:

 

 [2010-04-21 15:14 UTC] Eduards dot Samersovs at inbox dot lv
Description:
------------
Installed last Oracle 11gR2 database + 
oracle-instantclient11.2-basic-11.2.0.1.0-1.i386.rpm
oracle-instantclient11.2-devel-11.2.0.1.0-1.i386.rpm
I try also previous version of oracle-instantclient from 10gR2 - the result was ne same. 
Without "--with-oci8=/home/oracle/product/11.2.0/db_home1 --with-pdo-oci=/home/oracle/product/11.2.0/db_home1" options compilation is successfull!
Compiling using "root" user with full access.

./configure \
    --with-apxs2=$PREFIX/bin/apxs \
    --with-openssl \
    --with-bz2 \
    --with-zlib=/usr/local/zlib \
    --enable-sigchild \
    --without-sqlite \
    --without-pdo-sqlite \
    --with-xml --with-dom \
    --with-gettext \
    --with-iconv \
    --enable-mbstring=all \
    --enable-mbregex \
    --with-ftp \
    --with-mysql \
    --with-mcrypt=/usr \
    --with-gd --with-png-dir=/usr/lib --with-jpeg-dir=/usr/lib \
    --with-imap=/usr --with-kerberos=/usr --with-imap-ssl \
    --with-oci8=/home/oracle/product/11.2.0/db_home1 \
    --with-pdo-oci=/home/oracle/product/11.2.0/db_home1

Error:
php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5_KEY_MAX' failed.

Actual result:
--------------
Generating phar.php
php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5_KEY_MAX' failed.
/bin/sh: line 1: 26736 Aborted                 ` if test -x "/home/www/www-config/resource/php-5.3.2/sapi/cli/php"; then /home/www/www-config/resource/php-5.3.2/build/shtool echo -n -- "/home/www/www-config/resource/php-5.3.2/sapi/cli/php -n"; if test "x" != "x"; then /home/www/www-config/resource/php-5.3.2/build/shtool echo -n -- " -d extension_dir=/home/www/www-config/resource/php-5.3.2/modules"; for i in bz2 zlib phar; do if test -f "/home/www/www-config/resource/php-5.3.2/modules/$i.la"; then . /home/www/www-config/resource/php-5.3.2/modules/$i.la; /home/www/www-config/resource/php-5.3.2/build/shtool echo -n -- " -d extension=$dlname"; fi; done; fi; else /home/www/www-config/resource/php-5.3.2/build/shtool echo -n -- "/home/www/www-config/resource/php-5.3.2/sapi/cli/php"; fi;` -d 'open_basedir=' -d 'output_buffering=0' -d 'memory_limit=-1' -d phar.readonly=0 -d 'safe_mode=0' /home/www/www-config/resource/php-5.3.2/ext/phar/build_precommand.php > ext/phar/phar.php
make: *** [ext/phar/phar.php] Error 134

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2010-04-21 16:52 UTC] felipe@php.net
-Package: Compile Failure +Package: OCI8 related
 [2010-04-22 03:00 UTC] sixd@php.net
-Assigned To: +Assigned To: sixd
 [2010-04-22 03:00 UTC] sixd@php.net
I haven't been able to set up an enviroment to test your options.  One
thought is to build PHP without OCI8 & PDO_OCI, and then install them
later as shared extensions.

There are a couple of potential inconsistencies in the bug report.
Why install Instant Client if the DB libraries are available and used
by the configure options?  Were you using RPMs on Ubuntu, or the ZIP
files?  Some of the configuration options mentioned don't exist in PHP
5.3.  The syntax for --with-pdo-oci is missing the version number.
 [2010-05-04 15:02 UTC] Eduards dot Samersovs at inbox dot lv
I trying compiling with “instantclient” and “shared” with OCI8 & PDO_OCI and without – playing with the different kind of options the result was the same! Now I installed latest Oracle database from 10gR2 series and everything compiles fine! Seems problem exist with Oracle 11g.
 [2011-02-20 23:28 UTC] thinice at gmail dot com
This happened to me after an upgrade from Debian Lenny to Debian Squeeze. Attempted a fresh compile and got identical error. 

php 5.3.5 with oci8 instantclient. 

./configure --prefix=/usr --with-config-file-path=/etc/php5 --with-config-file-scan-dir=/etc/php5/apache2/conf.d --with-exec-dir=/usr/lib/php5/libexec --mandir=/usr/share/man --enable-cli --enable-sysvsem --enable-mbstring --enable-sockets --enable-soap --with-apxs2=/usr/bin/apxs2 --with-iconv --with-curl --with-zlib --with-openssl --with-ldap --with-mysql --with-mysqli --with-tidy --with-xmlrpc --with-oci8=instantclient,/opt/oracle/instantclient_11_1 --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-xpm-dir=/usr/X11R6 --with-png-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-mssql --enable-soap --with-imap --with-imap-ssl --with-kerberos --with-xsl --with-pspell
 [2011-02-20 23:31 UTC] thinice at gmail dot com
A possible solution: http://ubuntuforums.org/showthread.php?t=1434835

I will try this and add a remark.
 [2011-02-20 23:36 UTC] thinice at gmail dot com
Another side note, I removed '--with-imap --with-imap-ssl --with-kerberos' from my config and compile+install was successful. This isn't completely oci8's fault...

Working config - changed from my post above: 

./configure --prefix=/usr --with-config-file-path=/etc/php5 --with-config-file-scan-dir=/etc/php5/apache2/conf.d --with-exec-dir=/usr/lib/php5/libexec --mandir=/usr/share/man --enable-cli --enable-sysvsem --enable-mbstring --enable-sockets --enable-soap --with-apxs2=/usr/bin/apxs2 --with-iconv --with-curl --with-zlib --with-openssl --with-ldap --with-mysql --with-mysqli --with-tidy --with-xmlrpc --with-oci8=instantclient,/opt/oracle/instantclient_11_1 --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-xpm-dir=/usr/X11R6 --with-png-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-mssql --enable-soap --with-xsl --with-pspell
 [2011-02-21 01:38 UTC] thinice at gmail dot com
Using:

./configure --prefix=/usr --with-config-file-path=/etc/php5 --with-config-file-scan-dir=/etc/php5/apache2/conf.d --with-exec-dir=/usr/lib/php5/libexec --mandir=/usr/share/man --enable-cli --enable-sysvsem --enable-mbstring --enable-sockets --enable-soap --with-apxs2=/usr/bin/apxs2 --with-iconv --with-curl --with-zlib --with-openssl --with-ldap --with-mysql --with-mysqli --with-tidy --with-xmlrpc --with-oci8=instantclient,/opt/oracle/instantclient_11_1 --with-gd --enable-gd-native-ttf --with-jpeg-dir=/usr --with-xpm-dir=/usr/X11R6 --with-png-dir=/usr --with-freetype-dir=/usr --with-t1lib=/usr --with-mssql --enable-soap --with-imap --with-imap-ssl --with-kerberos --with-xsl --with-pspell --disable-phar


Console snip:
--------------
Build complete.
Don't forget to run 'make test'.

mhd-www:~/php-5.3.5# make install
Installing PHP SAPI module:       apache2handler
/usr/share/apache2/build/instdso.sh SH_LIBTOOL='/usr/share/apr-1.0/build/libtool' libphp5.la /usr/lib/apache2/modules
/usr/share/apr-1.0/build/libtool --mode=install cp libphp5.la /usr/lib/apache2/modules/
libtool: install: cp .libs/libphp5.so /usr/lib/apache2/modules/libphp5.so
libtool: install: cp .libs/libphp5.lai /usr/lib/apache2/modules/libphp5.la
libtool: install: warning: remember to run `libtool --finish /root/php-5.3.5/libs'
chmod 644 /usr/lib/apache2/modules/libphp5.so
[preparing module `php5' in /etc/apache2/mods-available/php5.load]
Module php5 already enabled
Installing PHP CLI binary:        /usr/bin/
Installing PHP CLI man page:      /usr/share/man/man1/
Installing build environment:     /usr/lib/php/build/
Installing header files:          /usr/include/php/
Installing helper programs:       /usr/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/share/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/lib/php/
php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5_KEY_MAX' failed.
Aborted
make[1]: *** [install-pear-installer] Error 134
make: *** [install-pear] Error 2
 [2011-02-21 05:21 UTC] thinice at gmail dot com
I resolved the issue by manually downloading libc-client2007e, Updating '--with-imap' config str to point to the libc-client2007e dir, (--with-imap=/path/to/libc-client2007e --with-imap-ssl). This allowed me to drop the '--with-kerberos' directive and elminating the error.
 [2011-08-22 17:52 UTC] mike dot mackintosh at angrystatic dot com
I have duplicated this currently on versions including 5.3.6 and on Debian Squeeze, CentOS6, and Ubuntu 11.1.

I've done the following steps to reproduce the issue:

unzip instantclient-basic-linux32-11.2.0.2.0.zip
unzip instantclient-sdk-linux32-11.2.0.2.0.zip
mv instantclient_11_2/sdk/ instantclient_11_2/
sudo mkdir /usr/local/oracle
mv instantclient_11_2/ /usr/local/oracle/instantclient
sudo mv instantclient_11_2/ /usr/local/oracle/instantclient
cd /usr/local/oracle/instantclient/
sudo ln -s /usr/local/oracle/instantclient/libclntsh.so.11.1 libclntsh.so
sudo ln -s /usr/local/oracle/instantclient/libocci.so.11.1 libocci.so.11.1
sudo ln -s /usr/local/oracle/instantclient/libocci.so.11.1 libocci.so
sudo ln -s /usr/local/oracle/instantclient/*.so /usr/lib
mkdir lib
cd lib/
sudo ln -s /usr/local/oracle/instantclient/*.so /usr/local/oracle/instantclient/lib


My configure string:

./configure  '--prefix=/usr/local/php-5.3.6' '--enable-cli' '--disable-debug' '--disable-rpath' '--disable-static' '--with-pic' '--with-openssl=/usr' '--enable-bcmath' '--with-bz2' '--enable-calendar' '--enable-ctype' '--with-curl' '--with-zlib-dir=/usr' '--with-xsl' '--enable-exif' '--enable-ftp' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-jpeg-dir=/usr' '--with-png-dir=/usr' '--with-freetype-dir=/usr' '--with-gettext' '--with-iconv' '--with-imap' '--with-kerberos=/usr' '--with-imap-ssl=/usr' '--enable-mbstring' '--with-mcrypt' '--with-mhash' '--with-mime-magic' '--with-mysql=/usr/local/mysql-5.1.57' '--with-pcre-regex=/usr' '--with-pspell=/usr' '--enable-sockets' '--enable-wddx' '--with-xmlrpc' '--with-zlib=/usr' '--with-pear' '--with-layout=GNU' '--with-ldap' '--enable-pdo' '--enable-soap' '--with-apxs2=/usr/local/apache-2.2.19/bin/apxs' '--enable-pcntl' '--enable-mailparse' '--enable-zip' '--with-zip=/usr' '--with-bz2=/usr' '--with-config-file-path=/etc' '--with-config-file-scan-dir=/usr/local/php-5.3.6/etc' '--with-pdo-mysql=/usr/local/mysql-5.1.57' '--with-openssl=/usr' '--enable-zip' '--with-snmp' '--with-mysqli=/usr/local/mysql-5.1.57/bin/mysql_config' '--with-phar' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg' '--with-tidy'  --with-oci8=instantclient,/usr/local/oracle/instantclient --with-pdo-oci=instantclient,/usr/local/oracle/instantclient,11.2.0.2

make

Ran into an issue where PHP tried to compile LDAP from the Oracle SDK, removed sdk/ldap.h

re-ran the above, and received the error:
php: threads.c:321: krb5int_key_register: Assertion `keynum >= 0 && keynum < K5_KEY_MAX' failed.


Removed the --with-kerberos option,and received:

configure: error: This c-client library is built with Kerberos support.

      Add --with-kerberos to your configure line. Check config.log for details.

Even with libc-client2007e for imap, i continue to receive the above.


I only receive an issue when compiling in oci support using the 11.x family

Removing all IMAP from the configure fixed the issue.
 [2011-08-22 18:31 UTC] thinice at gmail dot com
Mike: 

Did you also run the make for imap2007e lib? It's a bit goofy, you have to specify a distro.
 [2012-08-29 18:19 UTC] ehvozda at s-3 dot com
I am building with RUNTIME client, not INSTANT client on CentOS v6 w/ php 5.4.6 
and oracle client from 11gR1 database install DVD.

My build options are:

'./configure' '--prefix=/usr/local' '--with-apxs2=/usr/sbin/apxs' '--with-bz2' '-
-enable-calendar' '--with-curl' '--enable-exif' '--enable-ftp' '--with-gd' '--
with-gettext' '--with-gmp' '--with-imap' '--with-imap-ssl' '--enable-mbstring' '-
-with-mysql=/usr' '--with-mysqli' '--with-openssl' '--with-pdo-mysql' '--enable-
shmop' '--enable-soap' '--enable-sockets' '--with-xsl' '--enable-zip' '--with-
zlib' '--with-kerberos' '--with-mcrypt' '--with-jpeg-dir' '--with-png-dir' '--
with-mhash' '--with-freetype-dir=/usr' '--with-libdir=/lib64' '--enable-fileinfo' 
'--with-oci8'

dropping --with-oci8 will allow the build to succeed.
 [2017-10-24 07:52 UTC] kalle@php.net
-Status: Assigned +Status: Open -Assigned To: sixd +Assigned To:
 [2020-01-04 04:44 UTC] naox at yum dot pl
It is 10 years later and the bug is still present in PHP 7.4.1. Please all the time you need to fix this. Its not like we are mortal or something.

You can't build 
--with-oci8 --with-pdo-oci 
with
'--with-imap' '--with-imap-ssl' '--with-kerberos'

it works if one set of them is build as shared extension.
 [2021-09-24 14:55 UTC] cmb@php.net
-Type: Bug +Type: Documentation Problem
 [2021-09-24 14:55 UTC] cmb@php.net
Interestingly, this assertion is removed as of krb5 1.16[1],
because they would be tautological.  Apparently, they are not;
otherwise there wouldn't be this bug report.

Anyhow, this doesn't look like a PHP bug, but rather an issue with
upstream components, and the best we can do is to document this
potential conflict, and the workaround.

[1] <https://github.com/krb5/krb5/commit/1a8b805fc18c9b3865d472e765e19420d60348b6>
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 09:01:30 2024 UTC