Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

require and include problem: "does not support seeking"

Status
Not open for further replies.

lukelukeluke

Technical User
Joined
Dec 23, 2003
Messages
117
Location
CH
Hi there,
i have a problem with include() and require().
It works fine for me to require something into a page with the following order:
Code:
<?php
require('../dev/test.php');
?>
but if i try to put the following into a page with the absolute path with url of the page integrated,:
Code:
<?php
require('[URL unfurl="true"]http://www.domain.com/testfiles/dev/test.php');[/URL]
?>
then it gives me this error ontop of the page:
[highlight #FF99FF]
Warning: main(): stream does not support seeking in /home/ on line 2
[/highlight]
(the include works, the site is displayed, but i got the error on top of it. I need an include with the full path... Has this something to do with the CHMOD status of the files on the server??)
Thanks a lot for help!
 
Are you running PHP 4.3.2? There's a bug in that version which causes this.

If the file is on the local fileserver, you should be using filesystem paths, not URLs anyway. Fetching the content via a URL is resource intensive and slower.

One site I looked at claimed that if you're running PHP as an Apache module, you can work around the problem using the

Options -Indexes

Apache runtime configuration directive.



Want the best answers? Ask the best questions!

TANSTAAFL!!
 
In my experience using URLs for an include will result in the parsed content being passed to the script rather than the source code.

So
Code:
<?php
function foo() {
  echo 'Do nothing';
}
?>

When included by a URL will have absolutely no effect. Perhaps whatever the output of your required file is is causing the error?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top