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 #171903 is a reply to message #171902] Thu, 20 January 2011 18:14 Go to previous messageGo to previous message
Jerry Stuckle is currently offline  Jerry Stuckle
Messages: 2598
Registered: September 2010
Karma:
Senior Member
On 1/20/2011 12:38 PM, Jivanmukta wrote:
> Hello,
> I have fatal error "Cannot redeclare openDatabase()". My script starts
> with:
>
> <?php
> require_once 'include/common.inc.php';
> require_once 'include/functions.inc.php';
> require_once 'include/database.inc.php';
> require_once 'include/announcement.inc.php';
> require_once 'include/Captcha.php';
> if ($_SERVER['REQUEST_METHOD'] != 'POST') {
> error(ERRMSG_POST_ALLOWED_ONLY);
> }
> sessionBegin();
> savePostInSession();
> if (!openDatabase()) {
> error(ERRMSG_DATABASE_ACCESS_PROBLEM);
> }
>
> where database.inc.php contains single definition of openDatabase():
>
<rest of code snipped>

Either you've got another definition of openDatabase() somewhere and
don't realize it, or you are including (or requiring) database.inc.php
in one of your include files, probably without _once.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex(at)attglobal(dot)net
==================
[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 12:12:33 GMT 2024

Total time taken to generate the page: 0.04047 seconds