I've got the following error message (although everything seems to work fine):

* warning: file_get_contents() [function.file-get-contents]: URL file-access is disabled in the server configuration in /var/www/virtual/reiselabor.de/htdocs/sites/all/modules/mediafront/players/osmplayer/osmplayer.module on line 807.
* warning: file_get_contents(http://www.reiselabor.de/sites/all/modules/mediafront/players/osmplayer/...) [function.file-get-contents]: failed to open stream: no suitable wrapper could be found in /var/www/virtual/reiselabor.de/htdocs/sites/all/modules/mediafront/players/osmplayer/osmplayer.module on line 807.

Comments

travist’s picture

Status: Active » Needs review

What version of PHP are you using on your server? It seems that either A) You have an old version of PHP, or B) Your server has disabled this functionality within the php.ini.

Not sure why it is not able to open the player version file. Have you checked the permissions of the file it is trying to open?

Basstunes’s picture

My host uses PHP version 5.2.0-8+etch16.

The permissions are set to 0644 for files and 0755 for folders.

With the streaming thing: When configuring the player settings, I haven't put anything in the field for "media stream". The documentation doesn't say anything about what to enter there. I don't know whether this is related to the issue.

Nikeev’s picture

Hello, I have got the same problem. Site on localhost, and an error is:
warning: file_get_contents(http://localhost/<...>/sites/all/modules/mediafront/players/osmplayer/player/version) [function.file-get-contents]: failed to open stream: I can't read it, because wrong encoding. in D:\<...>\sites\all\modules\mediafront\players\osmplayer\osmplayer.module on line 814.

In preset settings this error appears too. And I can't save new settings, because button don't work.

travist’s picture

That is strange. Maybe it doesn't like it because it doesn't have an extension. What operating system is your localhost installed on?

I will look more into this.

Thanks,

Travis.

Nikeev’s picture

OS Windows 7
And I'm using Xampp as webserver.
Maybe because of this configuration appears error message.

rconstantine’s picture

Version: 6.x-1.0-beta1 » 6.x-1.0-beta2

I have the same error message.

warning: file_get_contents(http://iodwweb090/sites/all/modules/mediafront/players/osmplayer/player/version) [function.file-get-contents]: failed to open stream: HTTP request failed! HTTP/1.1 401 Unauthorized in D:\www\sites\all\modules\mediafront\players\osmplayer\osmplayer.module on line 814.

I too am on Windows. Windows Server 2003 running IIS. PHP.ini seems fine. Running PHP 5.2.9-1. I'll look into your code and report anything I find.

rconstantine’s picture

On http://php.net/manual/en/function.file-get-contents.php I found this:

rutger at webjin dot nl
14-Jan-2010 02:22
Sometimes you might get an error opening an http URL.
even though you have set "allow_url_fopen = On" in php.ini

For me the the solution was to also set "user_agent" to something.

but I tried setting user_agent to various valid strings and nothing helped.

rconstantine’s picture

Should one be able to paste the URL in their browser and see something? And why are you using a URL instead of a system file path? The FlashVideo module uses system paths.

rconstantine’s picture

Replacing the use of $base_url with getcwd() works for me. I'll now start configuring the preset to see whether any other uses of $base_url need changing too.

travist’s picture

I think that will do it! Thank you so much for this fix. I will update the CVS tonight and there should be a new DEV by tomorrow morning with this fix in place.

Thank you so much for looking into this.

Travis.

travist’s picture

Status: Needs review » Fixed

Just checked this into CVS. Expect the fix to be in DEV tomorrow morning.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.