How do I fix this error? Pageranking script

Discussion in 'Programming' started by Browning, Dec 18, 2007.

  1. #1
    mypageranking.org

    type in a url, hit submit, it throws an error. I just moved the site from another server, browning.insanegb.com It works there:confused:

    Here is the code it throws just in case you didn't look

    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 55
    
    Warning: file_get_contents(http://www.google.com/search?client=navclient-auto&ch=6-71654813&features=Rank&q=info:google.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 55
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 70
    
    Warning: file_get_contents(http://data.alexa.com/data?cli=10&dat=snbamz&url=google.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 70
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 90
    
    Warning: file_get_contents(http://www.google.com/search?q=link%3Agoogle.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 90
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 103
    
    Warning: file_get_contents(http://search.yahoo.com/search?p=links%3Agoogle.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 103
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 116
    
    Warning: file_get_contents(http://search.msn.com/results.aspx?q=link%3Agoogle.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 116
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 129
    
    Warning: file_get_contents(http://www.altavista.com/web/results?q=link%3Agoogle.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 129
    
    Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 142
    
    Warning: file_get_contents(http://www.alltheweb.com/search?q=link%3Agoogle.com) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /www/hostedwith.us/b/r/o/browning/htdocs/php/rank.class.php on line 142
    Code (markup):
     
    Browning, Dec 18, 2007 IP
  2. nasty.web

    nasty.web Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Ask your administrator to enable URL file-access or add
    php_flag allow_url_fopen on
    Code (markup):
    to .htaccess file.
     
    nasty.web, Dec 18, 2007 IP
  3. Browning

    Browning Banned

    Messages:
    1,928
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I don't see an htaccess file
     
    Browning, Dec 18, 2007 IP
  4. nasty.web

    nasty.web Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    .htaccess files can be hidden (it depends on your server). Note that there is a dot in file the beginning of file name. Also search for an option in your ftp client "show hidden files".
    If you are sure that you don't have such a file, then create it.
     
    nasty.web, Dec 18, 2007 IP
  5. Browning

    Browning Banned

    Messages:
    1,928
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #5
    yea I'm pretty sure it's not there. I don't know what goes into one
     
    Browning, Dec 18, 2007 IP
  6. nasty.web

    nasty.web Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    create an empty file named .htaccess, then add one line:
    php_flag allow_url_fopen on
    Code (markup):
    and upload it to your server
     
    nasty.web, Dec 18, 2007 IP
  7. Browning

    Browning Banned

    Messages:
    1,928
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #7
    didn't work
     
    Browning, Dec 18, 2007 IP
  8. nasty.web

    nasty.web Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #8
    Then contact your server administrator to allow URL file functions in php (It seems that you are not allowed to modify web server configuration via .htaccess too).
     
    nasty.web, Dec 18, 2007 IP
  9. Browning

    Browning Banned

    Messages:
    1,928
    Likes Received:
    29
    Best Answers:
    0
    Trophy Points:
    0
    #9
    decided to just say oh well an do something else with the hosting:)

    Thanks
     
    Browning, Dec 18, 2007 IP
  10. nasty.web

    nasty.web Peon

    Messages:
    35
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #10
    No problem :)
     
    nasty.web, Dec 18, 2007 IP