Bug #17747: PHP Fatal error: Cannot redeclare function_name()

From: Date: Thu, 13 Jun 2002 16:59:29 +0000
Subject: Bug #17747: PHP Fatal error: Cannot redeclare function_name()
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-10363@lists.php.net to get a copy of this message
From: lukemiller@mac.com Operating system: RH 7.2 PHP version: 4.1.2 PHP Bug Type: Scripting Engine problem Bug description: PHP Fatal error: Cannot redeclare function_name() This is similar to <a href="http://bugs.php.net/bug.php?id= 17720">this bug report</a>, but I'm using PHP 4.12. I have an include file called "func-inc.php" with a function declared like so... function dbq($str) { print($str); } ...and a main_file.php like so ... require_once("func-inc.php"); dbq("print this"); I have error reporting off on my server, so I don't get a message when running main_file.php, but intermittently (I'd say 10% of the time it does NOT work) the script will just hang and never return anything. When I check the Apache error_log file it shows the error "PHP Fatal error: Cannot redeclare dbq()" even though it's only been declared once in the include file. The next line always seems to be some variation of: "[notice] child pid 996 exit signal Segmentation fault (11)" My PHP config line is: './configure' '--with-mysql' '--with-gd' '--with-jpeg-dir' '--with-apache=../apache_1.3.24' I've never had this problem running on Mac OS X (PHP 4.12) with the config line:  '/SourceCache/apache_mod_php/apache_mod_php-7/php/ configure' '--prefix=/usr' '--mandir=/usr/share/man' '-- infodir=/usr/share/info' '--with-apxs' Hope there's an answer for this. Luke -- Edit bug report at http://bugs.php.net/?id=17747&edit=1 -- Fixed in CVS: http://bugs.php.net/fix.php?id=17747&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=17747&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=17747&r=needtrace Try newer version: http://bugs.php.net/fix.php?id=17747&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=17747&r=support Expected behavior: http://bugs.php.net/fix.php?id=17747&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=17747&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=17747&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=17747&r=globals

« previous php.bugs (#10363) next »