According to the Drupal system requirements for PHP it is preferable to disable allow_url_fopen in the PHP configuration. This leads to the following error and broken images from the staticmap module.
Warning: file_get_contents(): http:// wrapper is disabled in the server configuration by allow_url_fopen=0
The solution is to use drupal_http_request() instead of file_get_contents() as per the attached patch.
| Comment | File | Size | Author |
|---|---|---|---|
| staticmap-use-drupal-http-request.patch | 454 bytes | mstrelan |
Comments
Comment #1
rudiedirkx commentedComment #2
rudiedirkx commentedYou should at least check if
drupal_http_request()returns something useful. It might not even contain->data. The calling function should also check if it worked, and if it didn't, not use the cached file.