Page 1 of 1

PHP Errors Messages

Posted: Wed Aug 03, 2005 9:31 pm
by quadoc
I've the following error/message. Could someone explains to me what do they means? Thanks... :?

Warning: main(/Smarty/Smarty.class.php): failed to open stream: No such file or directory in /home/Project/public_html/schoolProject/setup.php on line 5

Fatal error: main(): Failed opening required '/Smarty/Smarty.class.php' (include_path='.:/usr/lib/php:/usr/local/lib/php') in /home/Project/public_html/schoolProject/setup.php on line 5

Posted: Wed Aug 03, 2005 9:41 pm
by Burrito
means the file you're trying to include is not at the path you specified it does.

Posted: Thu Aug 04, 2005 7:02 am
by quadoc
So the file Smarty.class.php is not found or the directory is not found?

Posted: Thu Aug 04, 2005 7:35 am
by feyd
if you code looks like:

Code: Select all

require('/Smarty/Smarty.class.php');
then it's very likely the path that isn't correct.. a slash sends the search to the root directory, not your web site's "root"

try:

Code: Select all

require('../Smarty/Smarty.class.php');
or other combinations...

Code: Select all

require($_SERVER['DOCUMENT_ROOT'].'/Smarty/Smarty.class.php');
may work....

Posted: Fri Aug 05, 2005 4:03 pm
by quadoc
Thanks for the tips guys... :)