Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts

    main(): stream does not support seeking

    When doing
    PHP Code:
    <?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?

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It's a bug in the Zend Optimizer:
    http://bugs.php.net/bug.php?id=24053

    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.
    De gustibus non est disputandum.

  • #3
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    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 .

  • #4
    Regular Coder
    Join Date
    Mar 2004
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Why does @include work but include fail?

    What does the @ do?

  • #5
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    It prevents errors for the function it's used on from being displayed on the page

  • #6
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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()
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.
    De gustibus non est disputandum.

  • #8
    Senior Coder Nightfire's Avatar
    Join Date
    Jun 2002
    Posts
    4,265
    Thanks
    6
    Thanked 48 Times in 48 Posts
    Aha, ta mordred, I was trying to remember the word to say what it does, supress. Been a long few days


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •