hello,

i have this message when i try to add a youtube vidéo to a node :

Warning : get_headers() [function.get-headers]: URL file-access is disabled in the server configuration dans MediaInternetYouTubeHandler->valid_id() (ligne 27 dans /homepages/5/d406644945/htdocs/yopen/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc).
Warning : get_headers() [function.get-headers]: This function may only be used against URLs. dans MediaInternetYouTubeHandler->valid_id() (ligne 27 dans /homepages/5/d406644945/htdocs/yopen/sites/all/modules/media_youtube/includes/MediaInternetYouTubeHandler.inc).
The YouTube video ID is invalid or the video was deleted.

i tried with many youtube links and all brang me back to this notice .

Do u have an idea from where the problem comes ? thank u all by advance..

Comments

Dave Reid’s picture

Project:Media» Media: YouTube
Version:7.x-1.0-rc3» 7.x-1.x-dev
Component:Media field» Code

Moving this over to the Media: Youtube issue queue.

Dave Reid’s picture

Title:youtube video» PHP Warning : get_headers(): URL file-access is disabled in the server configuration

Better title

Dave Reid’s picture

Title:PHP Warning : get_headers(): URL file-access is disabled in the server configuration» youtube video
Status:Active» Needs review
StatusFileSize
new763 bytes

We should be using drupal_http_request() instead of the way-less functional get_headers() for this. Please test the following patch.

Dave Reid’s picture

Title:youtube video» Use drupal_http_request() instead of get_headers() in MeidaInternetYouTubeHandler::valid_id()
Dave Reid’s picture

StatusFileSize
new829 bytes

Fixed this function should still return TRUE.

Dave Reid’s picture

Priority:Normal» Critical
Status:Needs review» Fixed

Without this patch I cannot also use the media_youtube module - it's completely non-functional for adding new videos. Committed #5 after testing to Git: http://drupalcode.org/project/media_youtube.git/commit/a3da322

Status:Fixed» Closed (fixed)

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