Page 1 of 1

inclusion doing my head in!!!

Posted: Sun Jun 30, 2002 11:10 am
by TuffGong
i've had this problem for some time now, but some background information first:

two directories:

directory :

Code: Select all

directory : [Messages]

[Messages] contains PHP files
[HTML] contains HTML file + 1 PHP file (Home.PHP)

Home.php contains two lines which tries to include files in [Messages]

include "../messages/file1.php";
include "../messages/file2.php";

this works perfectly on my windows Apache but once uploaded to my server it says it failed to include it! .. any ideas why????

M

Moo

Posted: Sun Jun 30, 2002 1:37 pm
by James Pelow
It should work - but it's really safer to add the full path on *nix. You probably know what that is but if not - it's the path from the base dir. For example on Mac OS X the path is /Library/WebServer/Documents

-James

Posted: Sun Jun 30, 2002 3:24 pm
by hob_goblin
maybe your include path is set wrong? try not putting the ".."

Posted: Mon Jul 01, 2002 1:46 am
by twigletmac
It's probably because *nix is case-sensitive and Windows isn't so either make your directories all lower-case or change this:

Code: Select all

include "../messages/file1.php"; 
include "../messages/file2.php";
to this:

Code: Select all

include "../Messages/file1.php"; 
include "../Messages/file2.php";
Keeping all file names and directory names lower case is a good idea when you'll be testing on a Windows machine and uploading to a *nix one as it means less issues with case sensitivity.

Mac

tried all the above

Posted: Mon Jul 01, 2002 1:04 pm
by TuffGong
but to no availo, i have another solution in mind, iw ill jus try that :-( .. probably some bug on my server or something

Posted: Tue Jul 02, 2002 1:32 am
by twigletmac
Does your host have it set up so that you can only access files in the HTML directory?

Mac