Fatal error: Class not found...

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Xeel
Forum Newbie
Posts: 6
Joined: Fri May 29, 2009 11:31 am

Fatal error: Class not found...

Post by Xeel »

Hi :)
I've got a strange error today after migrating from webdev to xampp local server (windows xp).
My library class says "Fatal error: Class 'Properties' not found in [abs path]\classes\repository.php on line 14". The class is obviously there and it all worked just fine before migration. Here goes the code:

repository.php:

Code: Select all

<?php
require_once("config.php");
require_once("extra_api.php");
require_once("bean_User.php");
require_once("bean_Usher.php");
require_once("Logging.php");
 
class Repository{
    private $conn;
    private $p;
    private $log;
 
    function __construct(){
        $this->p = new Properties(); //this is the error line #14
        $this->log = new Logging();
    }
...
config.php:

Code: Select all

<?php
class Properties{
//localhost
 
    public $dbhost = "localhost";
    public $dbuser = "user";
    public $dbpassword = "password";
    public $dbname = "mydb";
}
Both php files are in the same dir of course...
Any ideas?

XAMPP v1.7.1, PHP v5.2.9, WinXP SP3
Xeel
Forum Newbie
Posts: 6
Joined: Fri May 29, 2009 11:31 am

Re: Fatal error: Class not found...

Post by Xeel »

RESOLVED
Post Reply