I have worked on many PHP projects and clients are happy with work as well. Suddenly yesterday I got an email from my client about the issue. He was a little angry and saying that why it stops showing Google Map on my contact us page. It was showing below error message.
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration /public_html/GoogleMapAPI.class.php.
I know it is very easy to understand why it throws this error. It is showing this error means allow_url_fopen is off on the server. This may be action taken by hosting people for security. I try with below options to get it works. But none of the options works for me. I told him to contact hosting people to get this on. You may try below options to make it enable.
Option – 1 [.htaccess]
php_value allow_url_fopen On
Option – 2 [PHP Code]
Option – 3 [php.ini] If you have php.ini access in your hosting control panel than edit it and make sure that allow_url_fopen is on. If it is off than make it on.
If you dont have access to php.ini file than create php.ini file in root level, put below line and save it.
allow_url_fopen = on;
Warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration, URL file-access is disabled, URL file-access is disabled .htaccess, URL file-access is disabled in php, make allow_url_fopen on using .htaccess, allow_url_fopen on using php.ini will be solved using above solutions.