FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » fatal error: cannot redeclare
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: fatal error: cannot redeclare [message #171922 is a reply to message #171921] Fri, 21 January 2011 15:12 Go to previous message
Erwin Moller is currently offline  Erwin Moller
Messages: 228
Registered: September 2010
Karma:
Senior Member
On 1/21/2011 3:50 PM, Jerry Stuckle wrote:
> On 1/21/2011 8:38 AM, Jivanmukta wrote:
>>> Either you've got another definition of openDatabase() somewhere and
>>> don't realize it,
>>
>> robert@pecet:~/public_html$ find . -exec grep -H -n 'function
>> openDatabase' {} \;
>> ./include/database.inc.php:25:function openDatabase() {
>>
>>> or you are including (or requiring) database.inc.php
>>> in one of your include files, probably without _once.
>>
>> No, I don't.
>
> The problem is somewhere in your code. The interpreter doesn't just put
> out this message for no reason.
>
> Most often this is caused by an include you forgot about. Other options
> are files automatically included in the php.ini file, i.e. by the
> auto_prepend_file directive, an include path which is not what you
> expect, thereby including a different file than you expect, etc.
>

Building on Jerry's train of thought: Maybe you use some class that gets
autoloaded, and the include is done inside that class in some method?

Erwin Moller

--
"There are two ways of constructing a software design: One way is to
make it so simple that there are obviously no deficiencies, and the
other way is to make it so complicated that there are no obvious
deficiencies. The first method is far more difficult."
-- C.A.R. Hoare
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: getting file from <option>
Next Topic: ElephantMark - a new simple tool for PHP documentation
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Thu Nov 28 14:26:03 GMT 2024

Total time taken to generate the page: 0.10635 seconds