php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #27961 PHP Warning: Function registration failed - duplicate name
Submitted: 2004-04-12 10:06 UTC Modified: 2004-04-12 10:39 UTC
From: mikado at yahoo dot com Assigned:
Status: Not a bug Package: Dynamic loading
PHP Version: 4.3.5 OS: Linux 2.4.25-grsec
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mikado at yahoo dot com
New email:
PHP Version: OS:

 

 [2004-04-12 10:06 UTC] mikado at yahoo dot com
Description:
------------
I compiled PHP 4.3.5 with Apache 1.3.29 by following steps:

===:Pre-config Apache:===
./configure \
--prefix=/usr \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec/apache \
--sysconfdir=/etc/apache \
--datadir=/home/www \
--runtimedir=/var/run \
--logfiledir=/var/log/apache \
--proxycachedir=/var/cache/proxy

===:Config + Install PHP:===
./configure \
--prefix=/usr \
--sysconfdir=/etc \
--with-gnu-ld \
--with-apache=../apache_1.3.29 \
--enable-force-cgi-redirect \
--enable-discard-path \
--enable-fastcgi \
--with-config-file-path=/etc/php \
--with-config-file-scan-dir=/etc/php \
--disable-rpath \
--with-openssl=shared \
--with-zlib=shared \
--with-zlib-dir=/usr \
--with-bz2=shared \
--with-curl=shared \
--with-mysql=shared,/usr/local/mysql \
--enable-dba=shared \
--with-inifile \
--with-flatfile \
--with-dom=shared,/usr \
--with-dom-xslt=/usr \
--with-dom-exslt=/usr \
--with-fribidi=shared \
--with-gd=shared,/usr \
--with-jpeg-dir=/usr \
--with-png-dir=/usr \
--with-tiff-dir=/usr \
--with-xpm-dir=/usr/X11R6 \
--with-ttf \
--with-freetype-dir=/usr \
--with-t1lib \
--enable-gd-native-ttf \
--enable-gd-jis-conv \
--with-gettext=shared \
--with-gmp=shared \
--with-hyperwave=shared \
--with-iconv=shared \
--with-mime-magic=shared \
--with-ncurses=shared \
--with-pdpro=shared \
--with-pspell=shared \
--with-qtdom=shared \
--with-mm= \
--enable-bcmath=shared \
--enable-calendar=shared \
--enable-dbase=shared \
--enable-dbx=shared \
--enable-dio=shared \
--enable-exif=shared \
--enable-filepro=shared \
--enable-ftp=shared \
--enable-mstring=shared \
--enable-sockets \
--enable-sysvmsg=shared \
--enable-sysvsem=shared \
--enable-sysvshm=shared \
--enable-wddx=shared \
--enable-yp \
--enable-memory-limit \
--enable-zend-multibyte

then make + make install

===:Config + Install Apache:===
./configure \
--prefix=/usr \
--sbindir=/usr/sbin \
--libexecdir=/usr/libexec/apache \
--sysconfdir=/etc/apache \
--datadir=/home/www \
--runtimedir=/var/run \
--logfiledir=/var/log/apache \
--proxycachedir=/var/cache/proxy \
--disable-rule=SSL_COMPAT \
--activate-module=src/modules/php4/libphp4.a \
--enable-module=all \
--enable-shared=max \
--disable-module=example \
--enable-suexec \
--suexec-caller=httpd \
--suexec-docroot=/home/www/htdocs \
--suexec-logfile=/var/log/apache/suexec_log \
--suexec-userdir=web \
--suexec-uidmin=10000 \
--suexec-gidmin=10000

then make + make install

===:httpd.conf file:===
#...
LoadModule php4_module        libexec/apache/libphp4.so
#...
AddModule mod_php4.c
#...
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
#...

===:php.ini file:===
;...
extension_dir = "/usr/lib/php/extensions/no-debug-non-zts-20020429"
;...
extension=bcmath.so
extension=bz2.so
extension=calendar.so
extension=curl.so
extension=dba.so
extension=dbase.so
extension=dbx.so
extension=dio.so
extension=domxml.so
extension=exif.so
extension=filepro.so
extension=fribidi.so
extension=ftp.so
extension=gd.so
extension=gettext.so
extension=gmp.so
extension=iconv.so
extension=mime_magic.so
extension=mysql.so
extension=ncurses.so
extension=openssl.so
extension=pspell.so
extension=qtdom.so
extension=sysvmsg.so
extension=sysvsem.so
extension=sysvshm.so
extension=wddx.so
extension=zlib.so
;...


Reproduce code:
---------------
Finally I ran apache server and there are many "PHP Warning" in my apache's error_log. Each funtion of each extension produced 1 warning like that:

PHP Warning:  Function registration failed - duplicate name - mysql_listtables in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_listfields in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_db_name in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_dbname in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_tablename in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - mysql_table_name in Unknown on line 0
PHP Warning:  mysql:  Unable to register functions, unable to load in Unknown on line 0
...
PHP Warning:  Function registration failed - duplicate name - openssl_private_encrypt in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - openssl_private_decrypt in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - openssl_public_encrypt in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - openssl_public_decrypt in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - openssl_error_string in Unknown on line 0
PHP Warning:  openssl:  Unable to register functions, unable to load in Unknown on line 0
...
PHP Warning:  Function registration failed - duplicate name - imagepstext in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - imagepsbbox in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - imagetypes in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - jpeg2wbmp in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - png2wbmp in Unknown on line 0
PHP Warning:  Function registration failed - duplicate name - image2wbmp in Unknown on line 0
PHP Warning:  gd:  Unable to register functions, unable to load in Unknown on line 0


Expected result:
----------------
Please help me how to fix it! Thank you!


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2004-04-12 10:39 UTC] derick@php.net
Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PHP.

You're just loading the same extension multiple times.
 [2004-04-12 23:19 UTC] mikado at 4vn dot org
Sorry man, but cant find detail supports in your support section. You said that I had loaded extensions multiple times but it seems I loaded them ***OnE*** time for each of them!

PS: YoUr ***SuPpOrT*** doesnt have any troubleshooting or some thing like that, just simply ***MiNiMaL*** documents! Mailling list huh? Someone also has this problem as me for a long time but They and I didnt receive any supports from ***YoU***, my ***php.net***!

Thanks!
PHP newbie!
 [2004-05-04 06:55 UTC] jalmacen at edgeprojects dot com
This happens when you are loading the same module twice.
Typically this is common when you load the module via /etc/php.ini and then you have separate .ini files in /etc/php.d/ like mysql.ini, odbc.ini, etc.

You can fix this by either commenting out the line for the module in /etc/php.ini or /etc/php.d/*ini

Hope this helps.

Joy Almacen
 [2004-06-01 11:29 UTC] banditbandit at wanadoo dot fr
thx a lot for this 'so simple' answer ... as many users i searched a long time before solve this problem which overflow my log messages.
 [2004-08-20 16:54 UTC] larryab at spsp dot net
Joy,
  thanks for publishing your answer. I have the same original problem and worked on it a long while before finding this dialog. A simple solution. But a disapointment, since it would seem that PHP could provide an error/warning message while it parses and finds duplicate keywords that are likely to confuse.
Larry
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sat Dec 21 18:01:29 2024 UTC