Forums

PHP

This topic is locked

SSI

Posted 04 Nov 2001 00:24:12
1
has voted
04 Nov 2001 00:24:12 Ed Mc Land posted:
Hi
Using the PHPSSI I receive this code:
<?php require("/js.htm";?>.
Using it on the server I visualize the ssi, but after I receive this error:
Fatal error: Failed opening required '1' (include_path='.:/usr/local/lib/php') in /home/www/sitename/phpssi.php on line 13.
I tryed also <?php require virtual("/js.htm";?> but the error was the same.

Replies

Replied 04 Nov 2001 23:26:12
04 Nov 2001 23:26:12 Tim Green replied:
The problem is that your server has been configured with a pre-determined path for all include files.

What does this mean? Well, simply, it means that all files that are imported via include() or require() must be in that directory.

There are two ways to resolve this. The first, and most permanent way is to change the value of include_path in your PHP.ini, if you have access to it. If you do then changing the value to "/" should resolve that issue for you.

However, if you don't have access to this file, then at the very top of each file you will have to manually insert the following code:-

<?php
ini_set("include_path","/";
?>

This should resolve the problem for you.

Tim Green

Extension & PHP TalkZone Manager
<font size=1>-------------------------------------------
<i>Please read the Forum FAQ before posting
a question to this TalkZone.</i>
-------------------------------------------
www.UDzone.com : A dynamic Dreamweaver,
Ultradev and Fireworks site for developers
by developers.
-------------------------------------------</font id=size1>

Reply to this topic