File open website page error

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • chazzy69
    New Member
    • Sep 2007
    • 196

    File open website page error

    The error :

    http://www.somesite.co m
    Warning: fopen() [function.fopen]: php_network_get addresses: getaddrinfo failed: Name or service not known in /etc/etc/etc/etc/test.php on line 766

    Warning: fopen(http://www.somesite.co m) [function.fopen]: failed to open stream: Success in /home/etc/etc/etc/etc/test.php on line 766
    Unable to open file!

    I cant actually figure out what the error is reffering to???

    By the way the code of line 766 is:

    Code:
    $file = fopen($nextPage, "r") or exit("Unable to open file!");
    My guess is that it reffering to not being able to open the address contain in the variable $nextPage.

    Can someone please tell me if this is the actual error or if its reffering to something else.
  • chazzy69
    New Member
    • Sep 2007
    • 196

    #2
    Don't worry i figured out what the problem was,

    It was so simple, i was trying to open a non existant file lol;

    Thanks anyway

    Comment

    • hsriat
      Recognized Expert Top Contributor
      • Jan 2008
      • 1653

      #3
      Originally posted by chazzy69
      Don't worry i figured out what the problem was,

      It was so simple, i was trying to open a non existant file lol;

      Thanks anyway
      You should try file_exists in case its not sure whether file is there or not.

      Comment

      • mageswar005
        New Member
        • Mar 2008
        • 72

        #4
        Hi,
        Please give the chmod permission(777) for folder.

        by
        mageswaran

        Comment

        • ronverdonk
          Recognized Expert Specialist
          • Jul 2006
          • 4259

          #5
          Originally posted by mageswar005
          Hi,
          Please give the chmod permission(777) for folder.

          by
          mageswaran
          And why is that? OP only needs to open the file for read.

          Ronald

          Comment

          • dlite922
            Recognized Expert Top Contributor
            • Dec 2007
            • 1586

            #6
            Originally posted by mageswar005
            Hi,
            Please give the chmod permission(777) for folder.

            by
            mageswaran
            Are you trying to hack OP's server? relax, he's not writing to the folder.

            Comment

            Working...