fopen error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • IT Master2
    New Member
    • Aug 2007
    • 13

    #1

    fopen error

    hi every 1:

    when i use fopen(...) function to get file on remote server i get the following err:

    Warning: fopen(..) [function.fopen]: failed to open stream: HTTP request failed! HTTP/1.0 403 Forbidden in C:\....

    Does any one know what's wrong?

    Best regards.
  • ak1dnar
    Recognized Expert Top Contributor
    • Jan 2007
    • 1584

    #2
    Run phpinfo() and find out the values for allow_url_fopen in your php environment. may be fopen is restricted to open remote files.

    Comment

    • IT Master2
      New Member
      • Aug 2007
      • 13

      #3
      in my php.ini the allow_url_fopen is on:

      allow_url_fopen = On

      and still not work.

      so, what's wrong???

      Comment

      • ak1dnar
        Recognized Expert Top Contributor
        • Jan 2007
        • 1584

        #4
        Post the code here please.

        Comment

        • IT Master2
          New Member
          • Aug 2007
          • 13

          #5
          actualy it's not allowed to me to put the server address or the path i'm trying to open the file from (i'm currently working in ISP).

          but any way the problem probably (i'm not sure) is from the server that holds the file, and it's not PHP problem.

          so thanx guys. and when i solve the problem i'll post a thread if it was PHP problem.

          best regrds.

          Comment

          • HugoFromBOSS
            New Member
            • Sep 2007
            • 38

            #6
            Make sure that your permissions are correct!

            Comment

            • pbmods
              Recognized Expert Expert
              • Apr 2007
              • 5821

              #7
              Heya, IT.

              You're getting a 403 error from the server, which means that you do not have sufficient authorization to access that page.

              What are you trying to fetch?

              Comment

              • ak1dnar
                Recognized Expert Top Contributor
                • Jan 2007
                • 1584

                #8
                If that is the problem you may better to try to fetch a "well known page" that you can access by using the same coding. Then you can verify where the error is.Good luck.

                untill pbmods comes I thought the problem is with your Php configuration.

                Comment

                Working...