Cannot Re-Declare Mimetype

ianchan - October 17, 2008 - 05:11
Project:Web File Manager
Version:5.x-2.14
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I just updated to 5.x-2.14 and WebFM is generating to this error:

"Fatal error: Cannot redeclare mime_content_type() in /pathtodrupal/sites/all/modules/webfm/webfm.module on line 10"

#1

robmilne - October 17, 2008 - 13:46

Yikes! Which version of drupal 5 are you using?

#2

robmilne - October 17, 2008 - 14:06

Oops, I've unwittingly redefined the php function mime_content_type(). Very bad. I'll correct this asap.

Neither of my test servers caught this.

#3

robmilne - October 17, 2008 - 14:17

The quick solution is to replace all instances of the "mime_content_type" string with "webfm_mime_type" inside webfm.module. Since my servers are too forgiving, or running a version of php that doesn't complain, can you try this out and tell me if it fixes the problem?

#4

ianchan - October 17, 2008 - 16:21

Replacing mime_content_type with webfm_mime_type at lines 10 and 14 resolves the problem. Thanks for the rapid response.

We are running Drupal 5.11 on Apache 2.2.3, PHP 5.1.6, and RHEL5.

#5

robmilne - October 17, 2008 - 16:19

OK, but could also change lines 2166, 2517 and 2585 as well to the new name and then retest?

#6

ianchan - October 17, 2008 - 16:52

Okay, I tried those lines as well and the error did not appear.

#7

robmilne - October 17, 2008 - 17:12

Thanks.

#8

robmilne - October 17, 2008 - 17:21
Status:active» fixed

#9

ianchan - October 20, 2008 - 15:22
Status:fixed» closed

Thanks for resolving the issue.

 
 

Drupal is a registered trademark of Dries Buytaert.