views:

177

answers:

2
+1  A: 

sounds like you don't have "." (current folder) in your include path. You should modify your php.ini file to add it. You can find out the value on your live and test server by doing

<?php
phpinfo();
?>
Mike Sherov
The value of remote include_path is:.:/usr/lib/php:/usr/local/lib/phpLocal version is:.;C:\php5\pearI don't think the problem is path because PHP knows where the include file is (because it throws warning if I change the include file to some non-existent file). I don't know whe if PHP can find file it does not evaluate it...
Stazh
@Stazh, Perhaps you have blank files named File2.php and File3.php in the same dir as File1.php. Do "locate File2.php" from the Linux command line, and see if there are multiple copies of this file on the server.
Mike Sherov
No, I haven't, I checked.
Stazh
A: 

Try using a full path include instead:

include(dirname(FILE) . "/Dir1/File3.php");

reukiodo
When I use full path it works fine, but I have a lot of files to change then... It's too much work. And on the other hand why it works just fine on my local configuration and on every other remote server I've used so far. The problem is obviously that particular remote server.
Stazh