Bug #61151 [Opn->Fbk]: Incorrectly reports function as being redeclared
| From: | rasmus@php.net | Date: | Tue, 21 Feb 2012 06:59:19 +0000 |
| Subject: | Bug #61151 [Opn->Fbk]: Incorrectly reports function as being redeclared | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-167669@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=61151&edit=1
ID: 61151
Updated by: rasmus@php.net
Reported by: mark-kreine at yandex dot ru
Summary: Incorrectly reports function as being redeclared
-Status: Open
+Status: Feedback
Type: Bug
Package: Performance problem
Operating System: Ubuntu 11.10
PHP Version: 5.3.10
Block user comment: N
Private report: N
New Comment:
But you haven't given us any way to reproduce this as we can't see your code.
What is on lines 3 and 16 of your functions.php script?
The error message very clearly states that you are declaring get_tree() on line 3
and then again on line 16 of that file.
Previous Comments:
------------------------------------------------------------------------
[2012-02-21 06:48:31] mark-kreine at yandex dot ru
Description:
------------
I have created a web page which includes files config.php and functions.php. I define basic
constants in config.php while the file "functions.php" is used to define functions.
You can reproduce a problem if you create a page, include first "config.php" then
"functions.php" and just invoke this page from a web browser.
My configure line is as follows:
'./configure' '--prefix=/soft/programs/php'
'--with-apxs2=/soft/programs/apache/bin/apxs'
'--with-config-file-path=/soft/programs/php/ini'
'--with-config-file-scan-dir=/soft/programs/php/additional'
'--with-zlib=shared,/soft/programs/zlib' '--with-bz2=shared,/soft/programs/bzip'
'--with-curl=shared,/soft/programs/curl' '--with-gd=shared,/soft/programs/gd'
'--with-jpeg-dir=/soft/programs/jpeg' '--with-png-dir=/soft/programs/libpng'
'--with-freetype-dir=/soft/programs/freetype'
'--with-gettext=shared,/soft/programs/gettext'
'--with-mysql=shared,/soft/programs/mysql'
'--with-mcrypt=shared,/soft/programs/libmcrypt' '--enable-bcmath'
'--enable-exif' '--enable-ftp' '--enable-calendar'
'--enable-mbstring' '--with-libexpat-dir=/soft/programs/expat'
'--with-libxml-dir=/soft/programs/libxml'
'--with-xsl=shared,/soft/programs/libxslt' '--enable-zip'
Test script:
---------------
You'll find test script here:
http://www.kreine.ru/test/test-script.php
Expected result:
----------------
Normal script execution without any fatal error.
Actual result:
--------------
Fatal error: Cannot redeclare get_tree() (previously declared in ...) in /test/functions.php on line
16
------------------------------------------------------------------------
--
Edit this bug report at https://bugs.php.net/bug.php?id=61151&edit=1