Bug #17747 Updated: PHP Fatal error: Cannot redeclare function_name()
| From: | lukemiller at mac dot com | Date: | Sat, 15 Jun 2002 15:00:44 +0000 |
| Subject: | Bug #17747 Updated: PHP Fatal error: Cannot redeclare function_name() | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-10503@lists.php.net to get a copy of this message | ||
ID: 17747
Updated by: lukemiller@mac.com
Reported By: lukemiller@mac.com
-Status: Open
+Status: Bogus
Bug Type: Scripting Engine problem
Operating System: RH 7.2
PHP Version: 4.1.2
New Comment:
OK. I think I've fixed the problem. It seems like it was
problem with pdflib. For those of you who are having a
similar problem, one of the scripts that called pdflib was
causing a fatal error which eventually caused a
segmentation fault and other PHP script errors which caused
all kinds of problems with the rest of the sites/scripts
and eventually crashed the server.
The script is fixed and everything is working fine.
Previous Comments:
------------------------------------------------------------------------
[2002-06-14 00:33:27] lukemiller@mac.com
Here's what I've done. Installed php 4.1.2 with debug
option enabled but I must have done something wrong because
I got a message that no debug symbols were found when I
entered the command #gdb /path/to/apache/bin/httpd.
However, I figured out that when the pdflib module was NOT
loaded (I have it loaded through extenstion=/path/to/
libpdf_php.so) that I wasn't getting the error. I disable
debugging and it still worked fine (no errors) as long as
pdflib was disabled.
If this is a pdflib problem, sorry for the trouble.
However, a couple of things, with my limited knowledge of
PHPs engine, make me think that it might be a problem with
PHP. 1) The error is related to defining php functions and
2) I get the error in scripts that aren't calling and
pdflib functions.
I have tried, briefly, reproducing the problem with 4.2.1
but I ran into a problem with my pdlib modules compile
version. I will try that some more and let you know what I
find.
Thanks for your time.
------------------------------------------------------------------------
[2002-06-13 15:07:59] sniper@php.net
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read
http://bugs.php.net/bugs-generating-backtrace.php
Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PHP better.
Please try this with PHP 4.2.1.
------------------------------------------------------------------------
[2002-06-13 12:59:28] lukemiller@mac.com
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 this bug report at http://bugs.php.net/?id=17747&edit=1