Page 1 of 1

Classes not working with PHP v4.4.4

Posted: Sat Jan 20, 2007 8:39 am
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! :>|

Posted: Sat Jan 20, 2007 9:34 am
by feyd
How are you including the classes?

Posted: Sat Jan 20, 2007 10:30 am
by bigdavemmu
I'm using requires

Posted: Sat Jan 20, 2007 10:34 am
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?

Posted: Sat Jan 20, 2007 4:11 pm
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).