Page 1 of 1

Need some help resolving this error

Posted: Wed Jun 13, 2007 12:32 pm
by arukomp
Hi again,

I have a file called health.php:

Code: Select all

<?php

require_once("../inc.functions.php");
db_connect();
get_user_data();

$health = $_SESSION['userdata']->health;
$max_health = $_SESSION['userdata']->sta * 10;
echo "<span class=\"greenname\" style=\"font-size:14px;\">Health Points</span><br><br>";
echo "$health / $max_health Health Points";

mysql_close();

?>
It's local path is "C:\Program Files\xampp\htdocs\script\inc"

Now when I try to load that page I get the following error:

Fatal error: Cannot redeclare class config in C:\Program Files\xampp\php\pear\Config.php on line 43

I don't understand what is it all about php\pear\Config.php file if it's not even included in any of my scripts. Anyway, 43rd line on php\pear\Config.php file:

Code: Select all

class Config {
Please help me resolving this error, I have no idea about it :(

Descriptive subjects

Posted: Wed Jun 13, 2007 12:43 pm
by RobertGonzalez
Somewhere there is a class called Config that is already included and you are trying to create another class called Config after that first Config class is included.

Oh yeah:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.

Re: Descriptive subjects

Posted: Wed Jun 13, 2007 1:13 pm
by arukomp
Everah wrote:Somewhere there is a class called Config that is already included and you are trying to create another class called Config after that first Config class is included.

Oh yeah:
[url=http://forums.devnetwork.net/viewtopic.php?t=30037]Forum Rules[/url] Section 1.1 wrote:2. Use descriptive subjects when you start a new thread. Vague titles such as "Help!", "Why?" are misleading and keep you from receiving an answer to your question.
I've sorted it out. Include path was the one in error, so I just changed include path to "/" and everything worked out fine

And sorry about the subject of the thread

Posted: Wed Jun 13, 2007 9:45 pm
by suyeic
Please check this file ("../inc.functions.php"),and thse two functions you invoked.