Main Stream? Wha?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Chelsey
Forum Newbie
Posts: 5
Joined: Fri May 14, 2004 7:23 am

Main Stream? Wha?

Post by Chelsey »

Hey, so I just got with a new web host, and I'm currently in the process of moving my old files to their databases.

My problem is that on the pages it's giving me this wierd text:

Warning: main(): stream does not support seeking in /home/boundki/public_html/lufia/index.php on line 60

It never used to do that on my old site, and it's the exact same php coding. Is there some type of php file I'm missing that I haven't uploaded onto the server?
jason
Site Admin
Posts: 1767
Joined: Thu Apr 18, 2002 3:14 pm
Location: Montreal, CA
Contact:

Post by jason »

Different versions of PHP with different installed modules. Your new host probably has things configured a little differently.

Rather, what's the file's code that's giving the problem?
Chelsey
Forum Newbie
Posts: 5
Joined: Fri May 14, 2004 7:23 am

Post by Chelsey »

Code: Select all

<?php


include("http://www.boundkingdom.com/top.htm");

?>
<?php echo "$top"; ?>
It echoes the htm correctly, but it has that text I have in the first post, also.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Is that file (top.htm) on YOUR site, or another one? If it's on your site - you don't need the http:// stuff at the start, infact it is causing the error you have because for whatever reason, your new host doesn't seem to like / have configured properly the http protocol wrapper for the file streams. fseek() is used from PHP version 4.3.0 and above - run a phpinfo() to check what version your new host uses? (and tell is their name so others might avoid using them!!)
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

It's a security precaution so only people on that domain can include the files..
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

That's one way to describe it.
Chelsey
Forum Newbie
Posts: 5
Joined: Fri May 14, 2004 7:23 am

Post by Chelsey »

Is there other kind of easy php code that I could use to display my top and left bar htm instead of the current php echo I'm using? :?
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Chelsey - answer my original question and we can probably show you another way. See up.
d3ad1ysp0rk
Forum Donator
Posts: 1661
Joined: Mon Oct 20, 2003 8:31 pm
Location: Maine, USA

Post by d3ad1ysp0rk »

Code: Select all

<?php include("top.htm"); ?>
Chelsey
Forum Newbie
Posts: 5
Joined: Fri May 14, 2004 7:23 am

Post by Chelsey »

Top.htm is located in my main folder of html. But I have sub folders for each game page on the site.
User avatar
launchcode
Forum Contributor
Posts: 401
Joined: Tue May 11, 2004 7:32 pm
Location: UK
Contact:

Post by launchcode »

Chelsey - as punkSkater said you can just do an include for the local file.

However the include() function works on a local directory basis - so you will be better off setting the entire directory of the file, like this:

Code: Select all

include '/usr/home/site/whatever/top.htm';
Obviously change the directory path to match your host.
Chelsey
Forum Newbie
Posts: 5
Joined: Fri May 14, 2004 7:23 am

Post by Chelsey »

Ohmigod. Thank you all so much. I just fixed the problem. 8)

Again, much thanks.

-Chelsey
Post Reply