Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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"
Comments
Comment #1
robmilne CreditAttribution: robmilne commentedYikes! Which version of drupal 5 are you using?
Comment #2
robmilne CreditAttribution: robmilne commentedOops, I've unwittingly redefined the php function mime_content_type(). Very bad. I'll correct this asap.
Neither of my test servers caught this.
Comment #3
robmilne CreditAttribution: robmilne commentedThe 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?
Comment #4
ianchan CreditAttribution: ianchan commentedReplacing 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.
Comment #5
robmilne CreditAttribution: robmilne commentedOK, but could also change lines 2166, 2517 and 2585 as well to the new name and then retest?
Comment #6
ianchan CreditAttribution: ianchan commentedOkay, I tried those lines as well and the error did not appear.
Comment #7
robmilne CreditAttribution: robmilne commentedThanks.
Comment #8
robmilne CreditAttribution: robmilne commentedComment #9
ianchan CreditAttribution: ianchan commentedThanks for resolving the issue.