Page 1 of 1

Including a file on a public server

Posted: Fri Jun 25, 2004 3:43 am
by StumpDK
Hi!
I have uploaded my site to lets say, http://www.myserver.com. As I tested the site on my own computer, the site worked perfectly, but because of the new adress, none of the included files can be found.
The error:

Warning: main(smarty/libs/smarty_setup.php): failed to open stream: No such file or directory in /usr/local/psa/home/vhosts/myserver.com/httpdocs/main/main.php on line 2

The file returning the error is placed in myserver.com/httpdocs/classes.

The problem, as I see it is, that the file which is including the smarty-file, is placed in a directory a level under the directory in which the including file is placed. Or am I wrong?

Now, how can I included the missing file? I've tried the '/' in the main-file, but I get a error saying that the action is beyond my restrictions...?

Posted: Fri Jun 25, 2004 8:59 am
by tsg
The include files need to be the path on your server. Your path is probably something like

/home/user/public_html

or something like that. And the included files need to be using that path.

Create a test php page and type this:

Code: Select all

<?php
print $DOCUMENT_ROOT;

?>
Upload it. That should give you your path.

Tim