API page: http://api.drupal.org/comment/reply/22488
Calling the function from a site with a webserver level password will return a warning:
"file_get_contents(http://****/sites/all/libraries/jquery.hoverIntent/jquery.hoverIntent.js): failed to open stream: HTTP request failed! HTTP/1.1 401 Authorization Required in _locale_parse_js_file() (regel 1472 van /hum/userdata/****/drupal-7.12/includes/locale.inc)."
I guess the function should figure out if $filepath is from the same domain as the called page and get the file contents by a server file location if so... that would avoid this without breaking compatibility with data coming from other resources.
Comments
Comment #1
coert commentedComment #2
coert commentedComment #3
coert commentedFigured I should pass my own locations to this function, so it's solved, my bad.
Comment #4
finex commented@Coert: I'm experiencing this same issue, it has been triggered by wysiwyg module. Should be opened a bug report against wysiwyg? Thanks
Comment #5
mvci'm also seeing this with wysiwyg, but not with any other file_get_contents() calls in core. it would be nice to work around this.
Comment #6
twodThis happens because I accidentally made Wysiwyg add a local JavaScript file using an absolute URL, which made it impossible to aggregate or parse for translation when the server has set
allow_url_fopen=0.This is already fixed in 7.x-2.x-dev and will be part of the next release, see #1802394: Warning: file_get_contents from 7.x-2.1 to 7.x-2.2.