getid3 library not found error...

scafmac - February 20, 2007 - 17:48
Project:Media Field
Version:5.x-1.01-rc1
Component:Documentation
Category:support request
Priority:normal
Assigned:Unassigned
Status:closed
Description

I don't mean to be dense, but I can't get mediafield to recognize the getid3 library. You vaguely say put it in misc/lib, fine. I created a misc & lib directories in the module folder. And I put getid3 in there. So, just to be unambiguous, the path to the getid3.php file is:

sites/<<subsite>>/module/mediafield/misc/lib/getid3/getid3/getid3.php

However, when I check the code in the multimediafile.inc file I see that you have 'misc/lib/getid3/getid3/getid3.php' hardcoded in there. Seems reasonable. It must automagically use a relative path from the module folder. Just to be sure I stick a system call in there to see the path - whoops, it is not relative to the module folder, it is relative to the base installation folder. So it is looking for getid3 in base_path()/misc/lib/getid3. Is that what you meant?

I haven't been using Drupal for that long, but every other module I've tried that has dependencies puts those dependencies in the module folder, not in a base_path()/misc/lib folder - I've searched the handbook to see if this was some standard I was unaware of. If it is it is undocumented.

Is this a problem with my setup? Should the path in the multimediafile.inc be relative to the module directory? I've tried this with multiple sub sites - the first one has a complicated directory structure, but the same problem occurred even in a simple sub site configuration.

Any ideas what I'm missing?

#1

ardas - February 21, 2007 - 10:00

Hello,

Yeah, when I wrote misc/lib I ment that good old global misc folder. I think that putting common 3d party lib/component into the module's folder is a bad idea because this component can be shared between several modules. Don't you want each of them has its own copy of getid3 lib?

As for standard, I didn't find anything saying where to put such common 3d party libs and decided to put it into misc folder. Even in multisite configuration you probably don't need to have several copies of getid3 lib, right? If so, global misc is a best choice.

multimediafile.inc file should be in the same folder where audio and video fields are.

Honestly, I myself am not satisfied with misc. Instead, I prefer 'lib' or 'common' or 'cmn' dir in the root of Drupal for 3d party components, but unfortunatly Drupal doesn't assume this. Any ideas how to solve it?

#2

scafmac - February 21, 2007 - 15:01

No I do not have a solution. I see the merit of both positions, each module using its own version or a global library area for shared resources.

The short term problem as I see it is the readme is vague about creating a global misc/lib folder. Misc already exists, but lib didn't. Since no other module I've used has ever used or expected anything outside of its own folder tree, I believe you need to be 100% unambiguous that is where the module expects to find the getid3 library.

Thanks for the response. I'm sure it'll work now.

#3

ardas - February 21, 2007 - 15:47

For instance, gmap module does almost the same. It requires several javascript files to be put into global misc folder.

Okay, you absolutely right concerning documentation. I have updated it for HEAD, 5.0 and 4.7 revisions. Release will be available shortly.

Please, set this issue to close if everything is working. Otherwise, you are welcome to ask questions.

#4

ardas - February 22, 2007 - 09:15
Category:bug report» support request
Status:active» closed

#5

joachim - March 17, 2007 - 10:15

It would be a good idea to explicitly say in the documentation exactly where to put the getid3 library, giving a complete path.
The two nested 'getid3' folders can be confusing too!

Saying something like
"so that the path to the getid3.php file is (drupal base)/misc/lib/getid3/getid3/getid3.lib.php"

#6

ardas - March 26, 2007 - 09:15

Updated documentation was commited.

#7

capellic - July 2, 2008 - 14:25
Version:5.x-1.0» 5.x-1.01-rc1
Status:closed» postponed (maintainer needs more info)

The installation directions in the README file say:

2. Download getid3 library from http://getid3.org/ and unpack it to
'(drupal base)/misc/lib/getid3' direcctory. So, that
'(drupal base)/misc/lib/getid3/getid3/getid3.php' will be included.
IMPORTANT: It must be 'misc' directory which already exists in the Drupal root,
but not a new one within module's directory. Since, Drupal still doesn't have
any special directory for common 3d party libs/components we decided to make 'lib'
folder inside global 'misc' assuming that other media modules can also use the same lib.

But when I installed the module, I got this error:

The getID3() library was not found. Please install it into sites/all/modules/getid3/getid3.

I moved the files over to the modules directory per the error instructions. Please update your documentation to reflect the proper location of the getID3 library as per the getID3 module.

Thanks!

#8

a_c_m - July 2, 2008 - 21:39
Status:postponed (maintainer needs more info)» fixed

Good catch, in the latest update the module became dependent on the getid3 module, which deals with the id3libs... I've just updated the README to reflect this.

#9

Anonymous (not verified) - July 23, 2008 - 10:56
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.