To register for an Internet.com membership to receive newsletters and white papers, use the Register button ABOVE.
To participate in the message forums BELOW, click here
PHPBuilder.com  
 

 

Go Back   PHPBuilder.com > PHP Help > Newbies

Newbies Help for those who are just getting started

Reply
 
Thread Tools Search this Thread Rating: Thread Rating: 2 votes, 4.50 average. Display Modes
Old 06-03-2003, 08:09 PM   #1
uNF
Junior Member
 
Join Date: Jan 2003
Location: brs.qld.au
Posts: 12
stream does not support seeking?

Hi,

I've just reorganised my website to make it easier to navigate (for me, I've given it directory structure, instead of dumping everything in /)

Anyway, Now, I'm getting this problem whenever something gets included:

Warning: main(): stream does not support seeking in /home/camkb/public_html/m3rlin/index.php on line 117

PHP Code:
115     } elseif ($action == 'login') {
116      if (!$_GET['done']) {
117               include('http://m3rlin.ws/html/login_form.html');
118         } else {
I've got a feeling it's having "http", I used that, because I didn't want to have a heap of ../../ stuff to get back diretories.. do I have to make it https or something (it has some code which checks sessions.. could that be affected by having http?)

Thanks for any insight..

uNF is offline   Reply With Quote
Old 06-04-2003, 01:33 AM   #2
dalecosp
Still needs a yaller jeep
 
dalecosp's Avatar
 
Join Date: Jul 2002
Location: Accelerating Windows at 9.81 m/s....
Posts: 6,164
Re: stream does not support seeking?

Quote:
Originally posted by uNF
Hi,

Warning: main(): stream does not support seeking in /home/camkb/public_html/m3rlin/index.php on line 117

Thanks for any insight..

You may be on the right track, but don't forget to check whether or not include is allowed to access 'remote' files in php.ini

You could perhaps code with the $DOC_ROOT var.....
__________________
dalecosp ---------------- "God doesn't play dice." --- Albert Einstein

Getting Help at All! --- Collected Solutions to Common Problems --- General Bulletin Board Guidelines --- Debugging 101 --- Coding Forum FAQ --- Search the board --- T.F.M. (the 'friendly' manual, in English) --- Newbie FAQ
dalecosp is offline   Reply With Quote
Old 06-20-2003, 07:05 AM   #3
ivogomes
Junior Member
 
Join Date: Jun 2003
Location: Portugal
Posts: 2
I'm having the same problem. I solved it by replacing the includes like this:

before:
include ('http://www.website.com/contents/page.php');

after:
include ('/home/public_html/contents/page.php');

It works this way without any problems...


My real problem is when I want to include someting like this:

include ('http://www.website.com/contents/page.php?action=something');

Since my host updated PHP to version 4.3.2. the includes started showing the error:

Warning: main(): stream does not support seeking


I need some help on how to include this files. Please help me!!
ivogomes is offline   Reply With Quote
Old 06-20-2003, 07:13 AM   #4
ivogomes
Junior Member
 
Join Date: Jun 2003
Location: Portugal
Posts: 2
Hey!! I figured it out!!!

I must put an @ before the include, like this:

@include ('http://www.website.com/contents/page.php?action=something');


All pages work fine now.
ivogomes is offline   Reply With Quote
Old 07-15-2003, 05:05 PM   #5
goal
Junior Member
 
Join Date: Jul 2003
Posts: 1
That will supress the warning message, however it doesn't actually resolve the fact that it's generating the warning. If you're going to do some condition testing on the result of the include() then you're a bit screwed.
goal is offline   Reply With Quote
Old 07-17-2003, 11:58 PM   #6
mellymell
Junior Member
 
Join Date: Jul 2003
Location: Saint Louis, MO
Posts: 6
Hello all... So, now that we know that using "@" to supress the error message is a quick-fix, how do we actually fix the message. My problem is that I use subdomains and so for a subdomain, I have to access the include file with the full URL rather than a relative path (unless you know something I don't )

So, has PHP issued a fix to this issue or a way to resolve it on our end?
-------------
Okay, I just found out-silly me.... Even if I'm using a subdomain and therefore can't take a relative path, I can still use the FULL path: /home/username/public_html/doc.inc

I'm sure you all knew that... What makes it so bad is that I've included other files on the SAME pages with the full path... WHY OH WHY did I use a URL for the others?

Last edited by mellymell; 07-18-2003 at 12:07 AM.
mellymell is offline   Reply With Quote
Old 07-18-2003, 12:04 AM   #7
dalecosp
Still needs a yaller jeep
 
dalecosp's Avatar
 
Join Date: Jul 2002
Location: Accelerating Windows at 9.81 m/s....
Posts: 6,164
Quote:
Originally posted by mellymell
My problem is that I use subdomains and so for a subdomain, I have to access the include file with the full URL rather than a relative path (unless you know something I don't )
My subdomains are all on the same filesystem, therefore, I still don't have to include remote files.
Quote:
So, has PHP issued a fix to this issue or a way to resolve it on our end?
Well, one of them is called CURL... also, it wouldn't hurt most of us to RTFM on include() ...
__________________
dalecosp ---------------- "God doesn't play dice." --- Albert Einstein

Getting Help at All! --- Collected Solutions to Common Problems --- General Bulletin Board Guidelines --- Debugging 101 --- Coding Forum FAQ --- Search the board --- T.F.M. (the 'friendly' manual, in English) --- Newbie FAQ

Last edited by dalecosp; 07-18-2003 at 12:07 AM.
dalecosp is offline   Reply With Quote
Old 07-21-2003, 01:27 AM   #8
milomedia
Junior Member
 
Join Date: Jul 2003
Location: in the mountains
Posts: 1
Stream Problem

you know, the @ may not get to the root of the problem, but since the software works perfectly, there must be no problem. This is obviously a problem with the newer php... I had a wonderful little system running error free until my host upgraded. I say use the @... including a footer and or header will still work, and the end user won't see an ugly message.
-e
milomedia is offline   Reply With Quote
Old 07-25-2003, 12:30 PM   #9
daynah
PHP Princess
 
daynah's Avatar
 
Join Date: Mar 2001
Location: CA, USA
Posts: 324
Yea, it's definitely the newer php. I've been getting this error a lot lately. The best way to remedy the problem is to use:

Code:
<? include('/absolute/file/path/header.php'); ?>
If you use the absolute path, you don't need the ../../

The path usually looks like this:
Code:
<? include('/home/username/directory/header.php'); ?>

Quote:
My real problem is when I want to include someting like this:
include ('http://www.website.com/contents/page.php?action=something');
Since my host updated PHP to version 4.3.2. the includes started showing the error:
Warning: main(): stream does not support seeking

I need some help on how to include this files. Please help me!!
Before the include, try setting the action variable.

For example,
Code:
<?
	if($something)
	{
		$action = 'something';
		include('/home/public_html/contents/page.php');
	}
?>
I believe this should work. As long as the files are not called remotely.

I believe putting the @ in front of the function only surpresses the error from that function...
daynah is offline   Reply With Quote
Old 08-06-2003, 08:47 PM   #10
SVTBlackLight01
Junior Member
 
Join Date: Jul 2003
Posts: 1
And how do we solve this problem if the files are called remotely?
SVTBlackLight01 is offline   Reply With Quote
Old 08-06-2003, 10:44 PM   #11
dalecosp
Still needs a yaller jeep
 
dalecosp's Avatar
 
Join Date: Jul 2002
Location: Accelerating Windows at 9.81 m/s....
Posts: 6,164
Lightbulb

include()
__________________
dalecosp ---------------- "God doesn't play dice." --- Albert Einstein

Getting Help at All! --- Collected Solutions to Common Problems --- General Bulletin Board Guidelines --- Debugging 101 --- Coding Forum FAQ --- Search the board --- T.F.M. (the 'friendly' manual, in English) --- Newbie FAQ
dalecosp is offline   Reply With Quote
Old 09-15-2003, 03:16 PM   #12
hismightiness
Junior Member
 
hismightiness's Avatar
 
Join Date: Sep 2003
Location: Florida
Posts: 25
I may be simply missing it, but it does not seem to me that an actual solution was posted. Here is what I have:
PHP Code:
global $ad_filename;
$include_path="http://".$_SERVER["HTTP_HOST"]."/ads/";
@include (
$include_path.'ad_rotator.php?file=ad_banner01.txt');
I also get this error message using PHP version 4.3.2 on a Red Hat Linux server running Apache 1.3.28 (Unix).

I was just looking through the online documentation, and noticed the function "realpath()". Would this be useful in resolving the error issue?
__________________
Will
http://www.ServiceRank.com/
hismightiness is offline   Reply With Quote
Old 09-15-2003, 04:41 PM   #13
dalecosp
Still needs a yaller jeep
 
dalecosp's Avatar
 
Join Date: Jul 2002
Location: Accelerating Windows at 9.81 m/s....
Posts: 6,164
Hmm...

http://bugs.php.net/bug.php?id=24053


Appears that there might be a few developers aware of the issue.
__________________
dalecosp ---------------- "God doesn't play dice." --- Albert Einstein

Getting Help at All! --- Collected Solutions to Common Problems --- General Bulletin Board Guidelines --- Debugging 101 --- Coding Forum FAQ --- Search the board --- T.F.M. (the 'friendly' manual, in English) --- Newbie FAQ
dalecosp is offline   Reply With Quote
Old 09-15-2003, 08:03 PM   #14
brownafroduck
Junior Member
 
Join Date: Jul 2003
Posts: 1
Ugh I am experiencing the same problem, but just as of today... This is ridiculous if you ask me. That something this big wouldn't work.
brownafroduck is offline   Reply With Quote
Old 09-15-2003, 10:03 PM   #15
hismightiness
Junior Member
 
hismightiness's Avatar
 
Join Date: Sep 2003
Location: Florida
Posts: 25
Oh well, as a native ASP 3.0 developer, I am used to findings ways to work around obstacles in front of what I am trying to do. One of the reliefs behind using PHP nowadays, is the built-in functions which ASP does not have and requires you to write yourself.

Thanks for the update, dalecosp! That is a very useful link too...

Apparently, the only recommended way around this problem is to use a @ prior to the include() until an updated version of PHP corrects the problem.
__________________
Will
http://www.ServiceRank.com/
hismightiness is offline   Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 07:29 AM.








Acceptable Use Policy

Internet.com
The Network for Technology Professionals

Search:

About Internet.com

Legal Notices, Licensing, Permissions, Privacy Policy.
Advertise | Newsletters | E-mail Offers


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.