fopen failed

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • webbrain

    fopen failed

    Hi ng,
    i'm newbie at this ng.
    i have an apache webserver Apache/2.0.50 (Linux/SUSE) with php 4.3.8
    installed

    in a php script i want to embed the following function:

    <?php
    $sent=fopen("ht tp://www.thisurl.com ","r");
    ?>

    serverconfig:
    safe_mode is not active
    open_basedir is not active
    allow_url_fopen is set TRUE

    but do I always get the error:
    fopen(http://www.thisurl.com): failed to open stream: HTTP request failed!

    The code is correct, because we tried this on a server with older version of
    apache and php
    and it worked fine.
    Can anybody help me or tell me if this is a known bug?

    thanks a lot
    Mario



  • Kirsten

    #2
    Re: fopen failed

    Hi,

    is the script located on your server or is it an external?
    If external, check 'user_agent' in php.ini.
    So let the external server know for what kind of browser you want to
    receive the site.
    Some server dosn't allow scripts to receive data.

    -Kirsten

    Comment

    • Obvious

      #3
      Re: fopen failed

      On 16 Sep 2005 02:51:27 -0700, Kirsten wrote:
      [color=blue]
      > is the script located on your server or is it an external?[/color]

      What? who are you talking to? Learn to quote relevant parts when replying.

      Comment

      • Kirsten

        #4
        Re: fopen failed

        >> is the script located on your server or is it an external?

        [color=blue]
        >What? who are you talking to? Learn to quote relevant parts when replying.[/color]

        Thanks for your comment, i think it would help to solve the problem.
        Did you normally read the questions or the answers first?

        Comment

        • Obvious

          #5
          Re: fopen failed

          On 16 Sep 2005 05:38:27 -0700, Kirsten wrote:
          [color=blue][color=green][color=darkred]
          >>> is the script located on your server or is it an external?[/color][/color]
          >[color=green]
          >>What? who are you talking to? Learn to quote relevant parts when replying.[/color]
          >
          > Thanks for your comment, i think it would help to solve the problem.
          > Did you normally read the questions or the answers first?[/color]

          I read what's available! and that is not always every thread. So when you
          reply to a thread I haven't got on my newsreader because you have no idea
          of the rules that apply, or are to lazy, then I think it's within my
          purview to comment.

          Do you disagree.

          Comment

          • Kirsten

            #6
            Re: fopen failed

            >I read what's available! and that is not always every thread. So when you[color=blue]
            >reply to a thread I haven't got on my newsreader[/color]

            OK i understand the offline problem.
            [color=blue]
            >Do you disagree.[/color]

            I will quote in the future.

            -Kirsten

            Comment

            • Obvious

              #7
              Re: fopen failed

              On 16 Sep 2005 06:53:32 -0700, Kirsten wrote:
              [color=blue]
              > I will quote in the future.[/color]

              Thank you.

              Comment

              Working...