Results 1 to 5 of 5

Thread: How to stop this error message "Warning: file_get_contents()"

  1. #1
    Thread Starter
    Senior Member securityjobs's Avatar
    Join Date
    Jun 2011
    Location
    UK
    Posts
    107
    Thanks
    3
    Thanked 5 Times in 5 Posts

    How to stop this error message "Warning: file_get_contents()"

    Sometimes this warning message appears
    PHP Code:
    Warningfile_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /home/*******/public_html/wp-content/themes/jobroller/includes/theme-functions.php on line 750

    Warning
    file_get_contents(http://maps.google.com/maps/geo?q=kings+lynn&output=json&language=es&region=CL) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /home/******/public_html/wp-content/themes/jobroller/includes/theme-functions.php on line 750 
    and it seems like a permissions error. However, the problem is that it clearly says that Host doesn’t allow remote connection? Some hosting providers do not provide "php.ini EZconfig" which causes a problem with PHP 4 and higher as it won't let the commands open urls.

    The solution:
    1) Access your Cpanel and scroll down to "Software/Services" and click on "php.ini EZconfig".
    2) Then click on enable "EZconfig" and scroll down to "allow_url_fopen" and make sure that "on" is selected, also "allow_url_include" should also be on.

    If you do not have "php.ini EZconfig" available then do the following:
    1) Go to file manager in cpanel and click "ok" then in the top right corner search for "All your files" and type in "php.ini"
    2) Open the containing folder and highlight the file "php.ini" and click on "edit" and search for this line of text "allow_url_fopen" around line 496, it should read "allow_url_fopen = On". Also the next line should be "allow_url_include" and this should also be On. If they are "off" change the text to "On"

    If "php.ini" does not exeist then do the following:
    1) Stay in "file manager" and on the left hand side click on:

    (/home/********)
    then these folders should show on the right
    • access-logs
    • etc
    • forum-avatars
    • logs
    • mail
    • public_ftp
    • public_html
    • tmp
    • www

    2) click "new file" in the top left corner.
    In "Create a New File" dialog box type the following-

    New File Name: php.ini
    (ex: file.txt, file.html, file.php)

    New file will be created in:
    / leave this blank
    Then click "create new file"
    3) Next highlight the file "php.ini" and click "edit" at the top of the page to open the editor.
    type the following code:
    allow_url_fopen = On
    and click "save changes"

    Everything should now be working and you will not get the error message again.

  2. #2
    jomarkosabel's Avatar
    Join Date
    Mar 2009
    Location
    Philippines
    Posts
    41,006
    Thanks
    170
    Thanked 3,409 Times in 3,280 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!
    Please help our moderating team work more efficiently by not sending us support questions via PM. You can read more about how AppThemes support works here. However, you can send a PM to follow up and remind me if I missed your support request/thread.

    Thank you and have a nice day.

  3. #3
    spartac's Avatar
    Join Date
    May 2011
    Posts
    7,171
    Thanks
    75
    Thanked 830 Times in 808 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  4. #4
    Newbie rashw9's Avatar
    Join Date
    Dec 2011
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

  5. #5
    spartac's Avatar
    Join Date
    May 2011
    Posts
    7,171
    Thanks
    75
    Thanked 830 Times in 808 Posts
    You must be an AppThemes customer and logged in to view this response. Join today!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Allow HTML Editor " This field is required." error message
    By wolfspeed in forum Report ClassiPress Bugs
    Replies: 21
    Last Post: February 11th, 2011, 06:42 PM
  2. [SOLVED] Clicking "Ad Post" results in "404 Page Not Found" Message
    By cmbapp in forum Help Using ClassiPress
    Replies: 9
    Last Post: January 8th, 2011, 06:33 PM
  3. Replies: 3
    Last Post: September 11th, 2010, 06:48 PM
  4. Error message "Stylesheet is missing"
    By equinemedia in forum Help Using ClassiPress
    Replies: 2
    Last Post: April 9th, 2010, 12:06 AM