including a php file gives me an error. Not when include() t

Domenico

Well-Known Member
Aug 14, 2001
377
13
318
Hi all!

When I try to include a php file like this:
&?
require &file.php&;
?&
I get this error:
Fatal error: Failed opening required file.php'
(include_path='.:/usr/share/php') in /home/test/public_html/file.php on line 1


But when I do it like this:
&?
require &http://mydomain.com/file.php&;
?&
it works!

Why is this? I can't figure out why because on some clients it does work both ways.
What is configured wrong here?

Thank you,
Domenico
 

kosmo

Well-Known Member
Verifed Vendor
Aug 12, 2001
400
0
316
All over Europe
You may haven't defined &.& as include path. PHP willl only search in the local dir if it is defined as &include& path. If you can't access your php.ini then you can modify the .htaccess file of the dir where your php files exist. Add this line:

php_value include_path &/path/to/here&

kosmo