Classes not working with PHP v4.4.4

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
bigdavemmu
Forum Newbie
Posts: 22
Joined: Wed Oct 26, 2005 4:01 am

Classes not working with PHP v4.4.4

Post by bigdavemmu »

Hi there,

I have taken code from a webserve that I use to develop my site and placed it on an XP box with Apache and PHP. Both use version 1.3.37 Apache and 4.4.4 PHP.

However... my classes and extended classes are working on my public webserver but not on my local machine. I think it's to do with the way PHP is installed. Can someone please help me identify if settings can affect the classes?

The error received is:
Fatal error: Class events: Cannot inherit from undefined class CLASSNAME in c:\inetpub\wwwroot\websites\includes\classes\events.php on line 3

followed by...
Fatal error: Cannot instantiate non-existent class: events in c:\inetpub\wwwroot\websites\localband\index.php on line 9

I don't see why it wouldn't work on my localhost server as it's the same setup as the online server. Any ideas you may have would be great!

Thanks! :>|
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

How are you including the classes?
bigdavemmu
Forum Newbie
Posts: 22
Joined: Wed Oct 26, 2005 4:01 am

Post by bigdavemmu »

I'm using requires
nickvd
DevNet Resident
Posts: 1027
Joined: Thu Mar 10, 2005 5:27 pm
Location: Southern Ontario
Contact:

Post by nickvd »

Is the server IIS or Apache?

Is the script relying on the files to be in the include path?

Are you certain the files exist?
User avatar
aaronhall
DevNet Resident
Posts: 1040
Joined: Tue Aug 13, 2002 5:10 pm
Location: Back in Phoenix, missing the microbrews
Contact:

Post by aaronhall »

Did you set up Apache's document root as "c:\inetpub\wwwroot"? I'm asking because that's normally used for IIS.

Make sure that the parent class (CLASSNAME) is being loaded before your open its child (events.php).
Post Reply