Results 1 to 4 of 4

Thread: [RESOLVED] Fatal Error: cannot Redeclare function

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    [RESOLVED] Fatal Error: cannot Redeclare function

    whats with this error? can anybody explain this to me?

    Code:
    Fatal error: Cannot redeclare checkaccess() (previously declared in D:\xampp\htdocs\Cmi-Act\pageChecker.php:2)

  2. #2
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: Fatal Error: cannot Redeclare function

    You're declaring a function that already exists in the script scope.

    Most likely, the line indicated there includes a file which declares the function.
    Often caused by using include or require rather than include_once or require_once.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2007
    Location
    Cebu PH
    Posts
    95

    Re: [RESOLVED] Fatal Error: cannot Redeclare function

    solved the problem. i just put exit() to the line next to my includes.

  4. #4
    I'm about to be a PowerPoster!
    Join Date
    Jan 2005
    Location
    Everywhere
    Posts
    13,647

    Re: [RESOLVED] Fatal Error: cannot Redeclare function

    The oil pressure warning light on your car dashboard comes on. What do you do?

    Your solution is akin to opening the dashboard and unplugging the warning light.


    Use include_once or require_once.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width