Dear all,
i'm getting this error Fatal error: Class not found while trying to run my page.
i'm using php5.
any ideas please?
i found many topics over the net but none is solved.
Thanks for your help.
Fatal error: Class not found
Moderator: General Moderators
- Frozenlight777
- Forum Commoner
- Posts: 75
- Joined: Wed May 28, 2008 12:59 pm
Re: Fatal error: Class not found
sounds like you're trying to use methods or properties from an outside class and you don't have the class itself included. I don't know though because there's no code to look at.
Re: Fatal error: Class not found
Hey,
my code is the following:
require($DOCUMENT_ROOT."/unilog/library/hIniFileReader.inc");
$ini = new IniFileReader($DOCUMENT_ROOT."/unilog/config.ini");
when i run my page i get the following message:
Fatal error: Class 'IniFileReader' not found ...
it works well over php4 over a pc, i copied the website over another pc where php5 is installed. while running my website i get this error.
thanks for your help.
my code is the following:
require($DOCUMENT_ROOT."/unilog/library/hIniFileReader.inc");
$ini = new IniFileReader($DOCUMENT_ROOT."/unilog/config.ini");
when i run my page i get the following message:
Fatal error: Class 'IniFileReader' not found ...
it works well over php4 over a pc, i copied the website over another pc where php5 is installed. while running my website i get this error.
thanks for your help.
- superdezign
- DevNet Master
- Posts: 4135
- Joined: Sat Jan 20, 2007 11:06 pm
Re: Fatal error: Class not found
Try echoing $DOCUMENT_ROOT. It is possible that you were using register_globals on the former website, and $DOCUMENT_ROOT was created as a result of it.
- RobertGonzalez
- Site Administrator
- Posts: 14293
- Joined: Tue Sep 09, 2003 6:04 pm
- Location: Fremont, CA, USA
Re: Fatal error: Class not found
Also, for good measure, you should never try to hit a file without checking if the file_exists() first.