php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #22576 include() or require() file via HTTP wrapper
Submitted: 2003-03-06 15:30 UTC Modified: 2003-04-06 06:58 UTC
Votes:2
Avg. Score:5.0 ± 0.0
Reproduced:2 of 2 (100.0%)
Same Version:2 (100.0%)
Same OS:2 (100.0%)
From: mav at alkar dot net Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.3.2-dev OS: FreeBSD 4.8-RC
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: mav at alkar dot net
New email:
PHP Version: OS:

 

 [2003-03-06 15:30 UTC] mav at alkar dot net
When I write:
<?php
include "http://www.spooky.dp.ua/test.html";
?>
and that file are not empty I take message:
Warning: main() [function.main]: stream does not support seeking in http://www.spooky.dp.ua/test.html on line 0

PHP 4.3.1 compiled with options:
./configure \
--prefix=/usr/local \
--with-apxs=/usr/local/apache/bin/apxs \
--with-config-file-path=/usr/local/apache/conf \
--enable-memory-limit \
--with-mysql=/usr/local/mysql \
--with-gd=/usr/local \
--enable-trans-sid \
--enable-inline-optimization \
--enable-ftp \
--enable-dbase \
--enable-gd-native-ttf \
--with-ttf \
--with-freetype-dir=/usr/local \
--with-iconv \
--with-ming=/usr/local \
--with-zlib

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2003-03-06 15:44 UTC] mav at alkar dot net
I do it. Now I have another warning message:
Warning: main() [function.main]: stream does not support seeking in /www/clients/commerce/darknes/www.spooky.dp.ua/pages/news.html on line 6

news.html is a PHP script here that have include() on a line 6.
 [2003-03-22 12:30 UTC] dave at socrates dot thinkhost dot com
I am having the same problem, my O/S is FreeBSD 4.8-RC as well, and the PHP versions I am using is 4.3.1. I am running 4.3.2-RC1 on my own box, same problem seems to exist there:

I setup some example scripts to show what is happening, they are below:

[file.inc]
<?php
  echo "Hello World!";
?>

[test.php]
<?php
  include("http://pub.thinkhost.com/file.inc");
?>

When I call test.php, I get this:

Warning: main() [function.main]: stream does not support seeking in http://pub.thinkhost.com/file.inc on line 0

?php echo "Hello World!\n"; ?> 

An error message, and it appears that the first byte of the response from the web server to fetch file.inv has been nibbled off. Any idea why?
 [2003-03-31 16:01 UTC] iliaa@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php4-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php4-win32-STABLE-latest.zip

Cannot replicate using latest stable snapshot.
 [2003-04-06 06:58 UTC] sniper@php.net
Works fine with 4.3.2-RC.

 [2003-05-07 02:48 UTC] screwdriver at lxnt dot info
Does not work (i.e. spits warning: stream does not support seeking bla bla bla) for me on FreeBSD 4.8-RELEASE

Tried: 
PHP-4.3.2RC2 
php4-STABLE-200305070730

Both spit out warnings like

Warning: main(): stream does not support seeking in /home/www/htdocs/English/vacancy/job.php on line 2

line 2 being 
include("http://blablalbla ...");
 [2003-06-03 13:11 UTC] kelv at kelv dot net
Same problem here. Using stable PHP 4.3.2 on Slackware Linux 7.1, kernel 2.4.20.

<?php include("http://www.some.url.somewhere"); ?>
 [2003-06-08 13:00 UTC] jrpozo at conclase dot net
We are seeing the same with PHP4.3.2, Linux RedHat 7.3, Apache 1.3.27 (PHP as a module).

<?php
include("http://www.example.com/test.txt");
?>

yields this

Warning: main(): stream does not support seeking in /home/example/public_html/test.php on line 3

and includes the file.
 [2003-06-15 14:01 UTC] unknown at yabbse dot org
This report is related to bug #24053 (http://bugs.php.net/bug.php?id=24053) which was marked bogus.  (although it is not.)

This has repercussions with functions like getimagesize, which clearly need to be able to access remote files.  Now they spit out a warning....

-[Unknown]
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sun May 18 00:01:27 2025 UTC