Download & Extend

fatal error: cannot redeclare_video_common_get_player?? help please...

Project:Video
Version:5.x-1.x-dev
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

Hello,

I'm using drupal 5.3 and video module 5.x.1.x-dev. When users try to upload a video, this error occurs:

Fatal error: Cannot redeclare _video_common_get_player() (previously declared in /var/www/drupal2/modules/video/includes/common.inc:18) in /var/www/drupal2/modules/video/includes/common.inc on line 51

Any help?

Thank you,

Troiana

Comments

#1

Title:fatal error» fatal error: cannot redeclare_video_common_get_player?? help please...

Help anyone?
I don't understand this... I was thinking that maybe it was a incompatibility with modules that I installed after this one, but I removed them and the error stays :-S
And the fact that it says that it is redeclaring the function inside the function, how is it possible?

function _video_common_get_player($node) {
  switch (_video_get_filetype($node->vidfile)) {
    case 'divx':
      return theme('video_play_divx', $node);
    case 'mov':
    case 'mp4':
    case '3gp':
    case '3g2':
    case 'mpg':
      return theme('video_play_quicktime', $node);
    case 'rm':
      return theme('video_play_realmedia', $node);
    case 'flv':
      return theme('video_play_flash', $node);
    case 'swf':
      return theme('video_play_swf', $node);
    case 'dir':
    case 'dcr':
      return theme('video_play_dcr', $node);
    case 'asf':
    case 'wmv':
    case 'avi':
      return theme('video_play_windowsmedia', $node);
    case 'ogg':
      return theme('video_play_ogg_theora', $node);
    case 'youtube':
      return theme('video_play_youtube', $node);
    case 'googlevideo':
      return theme('video_play_googlevideo', $node);
    default:
      drupal_set_message('Video type not supported', 'error');
      break;
  }   }

#2

Same problem here!
Sometimes it works without an error and sometimes i get this error message with exactly the same lines.
If i upload the video (.mov) i can´t see the player only only the text and downloadlinks etc. and when i want to go to the category (made with views) where it is stored i get this message. I can´t open the category with the videos in it so i have no access to all the videos in this category. If I use the Youtube Video it works without errors. I used a patch before for manual resize (http://drupal.org/node/231790) of videos but that can´t be the reason because before i got this message too from time to time.
I can´t use the video-module if it works like that :( Made also a videotype with CCK but i don´t know how to show a player with it.

Help please
Schneewittchen

#3

Does replacing the instances of "include(" within the video module files with include_once(" help ?

#4

sorry but how do I do that within the code above?

thank you for your help.

Troiana

#5

Status:active» fixed

#6

I just encountered this error while implementing the video module on a legacy Drupal 5 web site.

The above error is caused at line 622 in video_upload.module:

include(drupal_get_path('module', 'video') .'/includes/common.inc');

Should be changed to:

include_once(drupal_get_path('module', 'video') .'/includes/common.inc');

#7

Status:fixed» needs review

I'm looking forward to port

#8

Status:needs review» fixed

#9

Status:fixed» closed (fixed)

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

nobody click here