|
mySql
What does "Warning:
main(): stream does not support seeking" mean?
"How do I bypass/get rid of suddenly introduced
Warning: main(): stream does not support seeking
messages?"
We have recently started upgrading our servers to the latest
stable version of PHP, version 4.3.4. Along with this upgrade
there appears to be a controversial "bug" which
is not really so much a bug as a change in php which pops
up in both personal and professional PHP code as a pest.
This bug involves the following warning message:
Warning: main(): stream does not support seeking
This error only appears to occur when processing PHP includes/requires
which reference URLs (absolute rather than relative paths).
Example:
<?php
include('http://somewhere.com/header.htm');
?>
Suggested workarounds:
(1) Use relative paths rather than absolute URLs when including
files stored locally on your account
Example:
Use this:
<?php
include('/home/hruserid/public_html/stuff/file.htm');
?>
...instead of this:
<?php
include('http://yourdomain.com/stuff/file.htm');
?>
(2) When including remote files located outside of your
domain try using @include rather than include
Example:
<?php
@include('http://otherdomain.com/file.htm');
?>
More Information
For more information, please see following PHP bug tracker
page:
http://bugs.php.net/bug.php?id=24053
Back to web hosting faqs
|