Page 1 of 1

include_path error

Posted: Sun Jan 08, 2006 6:12 am
by Gyurci
Hi Masters,
I am absolute beginner in PHP, and I would like to run a written web image gallery maker, but I get this error code:

Warning: main(include/Config.class.php): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/mydomain.biz/subdomains/elap/http docs/index.php on line 8

Fatal error: main(): Failed opening required 'include/Config.class.php' (include_path='.:/usr/local/psa/apache/lib/php') in /usr/local/psa/home/vhosts/mydomain.biz/subdomains/elap/http docs/index.php on line 8

I check the php server is running and the include_path is correct. I really don't know what is the problem, please help somebody for me!
:oops:


Thanks in advanced!


Gyurci

Posted: Sun Jan 08, 2006 8:58 am
by feyd
make sure you understand where php thinks you are running from and whatnot.

getcwd() will help you there.

Posted: Mon Jan 09, 2006 7:31 am
by s.dot
feyd is right as always

your relative path is most likely wrong

to avoid this you could a) make sure its not wrong ;) or b) use the absolute path. something like include '/home/user/path/to/file.php';

Posted: Mon Jan 09, 2006 9:07 am
by raghavan20
your current file path ....as it says from the error is...

Code: Select all

/usr/local/psa/home/vhosts/mydomain.biz/subdomains/elap/http docs/
make sure include/Config.class.php is like this
/usr/local/psa/home/vhosts/mydomain.biz/subdomains/elap/http docs/include
in real physical path


for traversing to another directory of the same level use soemthing like

Code: Select all

../peer_directory/file_name.ext