View Full Version : main(): stream does not support seeking

03-26-2004, 12:56 AM
When doing
<?PHP include ('http://faqs.geoffers.uni.cc/Cro-Mag%20Rally.txt'); ?> I get
Warning: main(): stream does not support seeking in /home/geoffers/public_html/faqs/cromagrallyview.php on line 15

What should I do about this?

03-26-2004, 01:21 AM
It's a bug in the Zend Optimizer:

Either put a @ before the include function call (one of the rare occassions where this is valid), or try to include the file through its absolute filesystem path, like /home/user/www/mytext.txt.

03-26-2004, 01:26 AM
Having seen your post in my thread in the General Web Building Forum, I changed it to readfile (), if anyone has a reason not to use it, speak now or forever hold your peace ;).

DHTML Kitchen
03-26-2004, 01:41 AM
Why does @include work but include fail?

What does the @ do?

03-26-2004, 10:21 AM
It prevents errors for the function it's used on from being displayed on the page

03-26-2004, 11:22 AM
Originally posted by DHTML Kitchen
Why does @include work but include fail?

Just a small comment:
this is not the right way to look at it. both verions will work and will have the same result and impact on the scriptexecution.
the only visual difference is what Nightfire said.
When you use an @, you best also supplie your own erromessages ...

in most cases; when you include a file, you will want to stop the scriptexecution when the file can not he included. So in most cases require() is a better choice then include()

03-26-2004, 11:46 AM
To clarify: I meant that using the @ operator to suppress the error warning from appearing is valid in this case, because this is clearly a bug and the include *does* work, i.e. does not effect script execution beside spitting out the warning, which it shouldn't. Normally one shouldn't use @ to ignore error warnings but rather fix the problem, but in this case it's an internal bug and not in your application.

Note that I conclude this from the description of the problem in the bug report, I can't reproduce this behaviour with my local setup.

03-26-2004, 11:49 AM
Aha, ta mordred, I was trying to remember the word to say what it does, supress. Been a long few days :p